diff --git a/data/data_info.yaml b/data/data_info.yaml deleted file mode 100644 index fc5f169..0000000 --- a/data/data_info.yaml +++ /dev/null @@ -1,36 +0,0 @@ -# The dataset_info.yaml file contains the information of the datasets used in the experiments. -spider: - hf_hub_url: "" - local_path: sql_finetune_data.json - dataset_format: spider - multi_turn: False - -alpaca: - hf_hub_url: tatsu-lab/alpaca - local_path: '' - dataset_format: alpaca - multi_turn: False - - -self-instruct: - hf_hub_url: yizhongw/self_instruct - local_path: '' - dataset_format: self-instruct - multi_turn: False - - -openassistant-guanaco: - hf_hub_url: timdettmers/openassistant-guanaco - local_path: timdettmers/openassistant-guanaco - dataset_format: alpaca - multi_turn: False - - -# mutli-turn datasets -evol_instruct: - hf_hub_url: WizardLM/WizardLM_evol_instruct_V2_196k - local_path: WizardLM/WizardLM_evol_instruct_V2_196k/WizardLM_evol_instruct_V2_143k.json - dataset_format: sharegpt - multi_turn: True - - diff --git a/scripts/ds_config/default_offload.json b/scripts/ds_config/default_offload.json deleted file mode 100644 index 13d01ff..0000000 --- a/scripts/ds_config/default_offload.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "bf16": { - "enabled": "auto" - }, - "optimizer": { - "type": "AdamW", - "params": { - "lr": "auto", - "betas": "auto", - "eps": "auto", - "weight_decay": "auto" - } - }, - "scheduler": { - "type": "WarmupDecayLR", - "params": { - "total_num_steps": "auto", - "warmup_min_lr": "auto", - "warmup_max_lr": "auto", - "warmup_num_steps": "auto" - } - }, - "zero_optimization": { - "stage": 3, - "offload_optimizer": { - "device": "cpu", - "pin_memory": true - }, - "offload_param": { - "device": "cpu", - "pin_memory": true - }, - "overlap_comm": true, - "contiguous_gradients": true, - "sub_group_size": 1e9, - "reduce_bucket_size": "auto", - "stage3_prefetch_bucket_size": "auto", - "stage3_param_persistence_threshold": "auto", - "stage3_max_live_parameters": 1e9, - "stage3_max_reuse_distance": 1e9, - "stage3_gather_16bit_weights_on_model_save": false - }, - "gradient_accumulation_steps": "auto", - "gradient_clipping": "auto", - "steps_per_print": 5, - "train_batch_size": "auto", - "train_micro_batch_size_per_gpu": "auto", - "wall_clock_breakdown": false -} diff --git a/scripts/ds_config/zero3_auto.json b/scripts/ds_config/zero3_auto.json deleted file mode 100644 index 9768b3e..0000000 --- a/scripts/ds_config/zero3_auto.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "fp16": { - "enabled": "auto", - "loss_scale": 0, - "loss_scale_window": 1000, - "initial_scale_power": 16, - "hysteresis": 2, - "min_loss_scale": 1 - }, - "bf16": { - "enabled": "auto" - }, - "optimizer": { - "type": "AdamW", - "params": { - "lr": "auto", - "betas": "auto", - "eps": "auto", - "weight_decay": "auto" - } - }, - "scheduler": { - "type": "WarmupDecayLR", - "params": { - "total_num_steps": "auto", - "warmup_min_lr": "auto", - "warmup_max_lr": "auto", - "warmup_num_steps": "auto" - } - }, - "zero_optimization": { - "stage": 3, - "offload_optimizer": { - "device": "cpu", - "pin_memory": true - }, - "offload_param": { - "device": "cpu", - "pin_memory": true - }, - "overlap_comm": true, - "contiguous_gradients": true, - "allgather_partitions": true, - "allgather_bucket_size": 5e8, - "sub_group_size": 1e9, - "reduce_bucket_size": "auto", - "stage3_prefetch_bucket_size": "auto", - "stage3_param_persistence_threshold": "auto", - "stage3_max_live_parameters": 1e9, - "stage3_max_reuse_distance": 1e9, - "stage3_gather_16bit_weights_on_model_save": true - }, - "train_batch_size": "auto", - "train_micro_batch_size_per_gpu": "auto", - "gradient_accumulation_steps": "auto", - "gradient_clipping": "auto", - "steps_per_print": 5, - "wall_clock_breakdown": false -} diff --git a/scripts/get_predict_qlora_64_nf4_bit4.sh b/scripts/get_predict_qlora_64_nf4_bit4.sh deleted file mode 100644 index edfc46e..0000000 --- a/scripts/get_predict_qlora_64_nf4_bit4.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " -# current_dir=$(pwd) -# parent_dir=$(dirname $current_dir) - -# python dbgpt_hub/utils/sql_data_process.py \ -# --data_filepaths data/spider/dev.json \ -# --output_file dev_sql.json - -# start_time=`date +"%Y-%m-%d %H:%M:%S"` -# echo "[INFO] date:${start_time} " - - -export PYTHONPATH=$PYTHONPATH:/home/LLM/code_llama09/DB-GPT-Hub - - -model_dir=/home/model_files/codellama/CodeLlama-7b-Instruct-hf - - -CUDA_VISIBLE_DEVICES=2,3 python dbgpt_hub/predict/predict_qlora_nf4_bit4.py - - # --base_model_name_or_path model_dir \ - # --peft_ckpt_path output_pred/qlora_bit4/checkpoint-500 \ - # --input_data_json dev_sql.json \ - # --output_name output_pred/qlora_bit4/pred/qlora_64_nf4_bit4.sql - -end_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "finished" -echo "[INFO] date:${end_time} " \ No newline at end of file diff --git a/scripts/lora/get_predict_lora.sh b/scripts/lora/get_predict_lora.sh deleted file mode 100644 index 082769c..0000000 --- a/scripts/lora/get_predict_lora.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - - -# prepare dev data -python dbgpt_hub/utils/sql_data_process.py \ - --data_filepaths data/spider/dev.json \ - --output_file dev_sql.json \ - -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " - -# get lora predict -CUDA_VISIBLE_DEVICES=3 python ./predict_lora.py - -end_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "finished" -echo "[INFO] date:${end_time} " \ No newline at end of file diff --git a/scripts/lora/lora.sh b/scripts/lora/lora.sh deleted file mode 100644 index 74bb28e..0000000 --- a/scripts/lora/lora.sh +++ /dev/null @@ -1,35 +0,0 @@ -python dbgpt_hub/utils/sql_data_process.py - -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " - -CUDA_VISIBLE_DEVICES=3 python train_lora.py \ - --dataset_name spider \ - --model_name_or_path meta-llama/Llama-2-7b-hf \ - --output_dir adapter\lora \ - --num_train_epochs 1 \ - --per_device_train_batch_size 4 \ - --per_device_eval_batch_size 4 \ - --gradient_accumulation_steps 8 \ - --evaluation_strategy "no" \ - --save_strategy "steps" \ - --save_steps 250 \ - --max_steps 500 \ - --save_total_limit 5 \ - --learning_rate 0.0002 \ - --weight_decay 0. \ - --warmup_ratio 0.03 \ - --optim "adamw_torch" \ - --lora_r 8 \ - --lora_alpha 16 \ - --lora_dropout 0.1 \ - --lr_scheduler_type "constant" \ - --model_max_length 1024 \ - --logging_steps 20 \ - --do_train \ - --gradient_checkpointing True - -end_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "finished" -echo "[INFO] date:${end_time} " -# python dbgpt_hub/utils/merge_peft_adapters.py diff --git a/scripts/lora/lora_ds.sh b/scripts/lora/lora_ds.sh deleted file mode 100644 index 602e467..0000000 --- a/scripts/lora/lora_ds.sh +++ /dev/null @@ -1,38 +0,0 @@ -python dbgpt_hub/utils/sql_data_process.py - -python dbgpt_hub/utils/sql_data_process.py \ - --data_filepaths data/spider/dev.json \ - --output_file dev_sql.json - -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " - -CUDA_VISIBLE_DEVICES=0 torchrun --nproc_per_node=1 train_lora.py \ - --model_name_or_path meta-llama/Llama-2-7b-hf \ - --data_path sql_finetune_data.json \ - --output_dir adapter \ - --num_train_epochs 3 \ - --per_device_train_batch_size 4 \ - --per_device_eval_batch_size 4 \ - --gradient_accumulation_steps 8 \ - --evaluation_strategy "no" \ - --save_strategy "steps" \ - --save_steps 500 \ - --save_total_limit 5 \ - --learning_rate 2e-5 \ - --weight_decay 0. \ - --warmup_ratio 0.03 \ - --optim "adamw_torch" \ - --lr_scheduler_type "cosine" \ - --model_max_length 2048 \ - --logging_steps 1 \ - --do_train \ - --do_eval \ - --gradient_checkpointing True \ - --deepspeed "scripts/ds_config/zero3_auto.json" - -end_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "finished" -echo "[INFO] date:${end_time} " - -# python dbgpt_hub/utils/merge_peft_adapters.py \ No newline at end of file diff --git a/scripts/no_peft/get_predict_no_peft_llama2_13b_hf.sh b/scripts/no_peft/get_predict_no_peft_llama2_13b_hf.sh deleted file mode 100644 index ed11eea..0000000 --- a/scripts/no_peft/get_predict_no_peft_llama2_13b_hf.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " - - -CUDA_VISIBLE_DEVICES=4,5 python ./predict_no_peft_llama2_13b_hf_new.py - -end_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "finished" -echo "[INFO] date:${end_time} " diff --git a/scripts/qlora/get_predict_qlora.sh b/scripts/qlora/get_predict_qlora.sh deleted file mode 100644 index e6b73bb..0000000 --- a/scripts/qlora/get_predict_qlora.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - - - -python dbgpt_hub/utils/sql_data_process.py \ - --data_filepaths data/spider/dev.json \ - --output_file dev_sql.json - -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " - -CUDA_VISIBLE_DEVICES=2,3 python predict_qlora.py - -end_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "finished" -echo "[INFO] date:${end_time} " \ No newline at end of file diff --git a/scripts/qlora/qlora.sh b/scripts/qlora/qlora.sh deleted file mode 100644 index 1b9b744..0000000 --- a/scripts/qlora/qlora.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -python dbgpt_hub/utils/sql_data_process.py - -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " - -python train_qlora.py \ - --model_name_or_path meta-llama/Llama-2-7b-hf \ - --output_dir adapter\qlora \ - --dataset_name spider \ - --use_auth \ - --logging_steps 10 \ - --save_strategy steps \ - --data_seed 42 \ - --save_steps 500 \ - --save_total_limit 40 \ - --evaluation_strategy steps \ - --max_eval_samples 1000 \ - --per_device_eval_batch_size 1 \ - --max_new_tokens 32 \ - --dataloader_num_workers 1 \ - --group_by_length \ - --logging_strategy steps \ - --remove_unused_columns False \ - --do_train \ - --lora_r 64 \ - --lora_alpha 16 \ - --double_quant \ - --quant_type nf4 \ - --bf16 \ - --bits 4 \ - --warmup_ratio 0.03 \ - --lr_scheduler_type constant \ - --gradient_checkpointing \ - --source_max_len 16 \ - --target_max_len 512 \ - --per_device_train_batch_size 1 \ - --gradient_accumulation_steps 16 \ - --max_steps 1875 \ - --eval_steps 187 \ - --learning_rate 0.0002 \ - --adam_beta2 0.999 \ - --max_grad_norm 0.3 \ - --lora_dropout 0.1 \ - --weight_decay 0.0 \ - --seed 0 - -start_time=`date +"%Y-%m-%d %H:%M:%S"` -echo "[INFO] date:${start_time} " -# python dbgpt_hub/utils/merge_peft_adapters.py diff --git a/sql_finetune_data.json b/sql_finetune_data.json deleted file mode 100644 index b0abc6e..0000000 --- a/sql_finetune_data.json +++ /dev/null @@ -1 +0,0 @@ -[{"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "How many heads of the departments are older than 56 ?", "output": "select count(*) from head where age > 56"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. The name contains values such as State. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "List the name, born state and age of the heads of departments ordered by age.", "output": "select name, born_state, age from head order by age"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "List the creation year, name and budget of each department.", "output": "select creation, name, budget_in_billions from department"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "What are the maximum and minimum budget of the departments?", "output": "select max(budget_in_billions), min(budget_in_billions) from department"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "What is the average number of employees of the departments whose rank is between 10 and 15?", "output": "select avg(num_employees) from department where ranking between 10 and 15"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. The name contains values such as State. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. The born_state contains values such as California. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "What are the names of the heads who are born outside the California state?", "output": "select name from head where born_state != 'California'"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. The name contains values such as State. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. The born_state contains values such as Alabama. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "What are the distinct creation years of the departments managed by a secretary born in state 'Alabama'?", "output": "select distinct t1.creation from department as t1 join management as t2 on t1.department_id = t2.department_id join head as t3 on t2.head_id = t3.head_id where t3.born_state = 'Alabama'"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. The name contains values such as State. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "What are the names of the states where at least 3 heads were born?", "output": "select born_state from head group by born_state having count(*) >= 3"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "In which year were most departments established?", "output": "select creation from department group by creation order by count(*) desc limit 1"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The temporary_acting contains values such as Yes. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?", "output": "select t1.name, t1.num_employees from department as t1 join management as t2 on t1.department_id = t2.department_id where t2.temporary_acting = 'Yes'"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "How many acting statuses are there?", "output": "select count(distinct temporary_acting) from management"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "How many departments are led by heads who are not mentioned?", "output": "select count(*) from department where department_id not in (select department_id from management);"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "What are the distinct ages of the heads who are acting?", "output": "select distinct t1.age from management as t2 join head as t1 on t1.head_id = t2.head_id where t2.temporary_acting = 'Yes'"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. The name contains values such as Homeland Security, Treasury. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.", "output": "select t3.born_state from department as t1 join management as t2 on t1.department_id = t2.department_id join head as t3 on t2.head_id = t3.head_id where t1.name = 'Treasury' intersect select t3.born_state from department as t1 join management as t2 on t1.department_id = t2.department_id join head as t3 on t2.head_id = t3.head_id where t1.name = 'Homeland Security'"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "Which department has more than 1 head at a time? List the id, name and the number of heads.", "output": "select t1.department_id, t1.name, count(*) from management as t2 join department as t1 on t1.department_id = t2.department_id group by t1.department_id having count(*) > 1"}, {"instruction": "department_management contains tables such as department, head, management. Table department has columns such as department_id, name, creation, ranking, budget_in_billions, num_employees. department_id is the primary key. Table head has columns such as head_id, name, born_state, age. head_id is the primary key. Table management has columns such as department_id, head_id, temporary_acting. department_id is the primary key. The head_id of management is the foreign key of head_id of head. The department_id of management is the foreign key of department_id of department.", "input": "Which head's name has the substring 'Ha'? List the id and name.", "output": "select head_id, name from head where name like '%ha%'"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "How many farms are there?", "output": "select count(*) from farm"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Count the number of farms.", "output": "select count(*) from farm"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "List the total number of horses on farms in ascending order.", "output": "select total_horses from farm order by total_horses asc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What is the total horses record for each farm, sorted ascending?", "output": "select total_horses from farm order by total_horses asc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. The theme contains values such as Aliens. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the hosts of competitions whose theme is not \"Aliens\"?", "output": "select hosts from farm_competition where theme != 'Aliens'"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. The theme contains values such as Aliens. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Return the hosts of competitions for which the theme is not Aliens?", "output": "select hosts from farm_competition where theme != 'Aliens'"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the themes of farm competitions sorted by year in ascending order?", "output": "select theme from farm_competition order by year asc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Return the themes of farm competitions, sorted by year ascending.", "output": "select theme from farm_competition order by year asc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What is the average number of working horses of farms with more than 5000 total number of horses?", "output": "select avg(working_horses) from farm where total_horses > 5000"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Give the average number of working horses on farms with more than 5000 total horses.", "output": "select avg(working_horses) from farm where total_horses > 5000"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the maximum and minimum number of cows across all farms.", "output": "select max(cows), min(cows) from farm"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Return the maximum and minimum number of cows across all farms.", "output": "select max(cows), min(cows) from farm"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "How many different statuses do cities have?", "output": "select count(distinct status) from city"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Count the number of different statuses.", "output": "select count(distinct status) from city"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "List official names of cities in descending order of population.", "output": "select official_name from city order by population desc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the official names of cities, ordered descending by population?", "output": "select official_name from city order by population desc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "List the official name and status of the city with the largest population.", "output": "select official_name, status from city order by population desc limit 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What is the official name and status of the city with the most residents?", "output": "select official_name, status from city order by population desc limit 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Show the years and the official names of the host cities of competitions.", "output": "select t2.year, t1.official_name from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Give the years and official names of the cities of each competition.", "output": "select t2.year, t1.official_name from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Show the official names of the cities that have hosted more than one competition.", "output": "select t1.official_name from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id group by t2.host_city_id having count(*) > 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the official names of cities that have hosted more than one competition?", "output": "select t1.official_name from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id group by t2.host_city_id having count(*) > 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Show the status of the city that has hosted the greatest number of competitions.", "output": "select t1.status from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id group by t2.host_city_id order by count(*) desc limit 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What is the status of the city that has hosted the most competitions?", "output": "select t1.status from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id group by t2.host_city_id order by count(*) desc limit 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Please show the themes of competitions with host cities having populations larger than 1000.", "output": "select t2.theme from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id where t1.population > 1000"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the themes of competitions that have corresponding host cities with more than 1000 residents?", "output": "select t2.theme from city as t1 join farm_competition as t2 on t1.city_id = t2.host_city_id where t1.population > 1000"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Please show the different statuses of cities and the average population of cities with each status.", "output": "select status, avg(population) from city group by status"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the statuses and average populations of each city?", "output": "select status, avg(population) from city group by status"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Please show the different statuses, ordered by the number of cities that have each.", "output": "select status from city group by status order by count(*) asc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Return the different statuses of cities, ascending by frequency.", "output": "select status from city group by status order by count(*) asc"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "List the most common type of Status across cities.", "output": "select status from city group by status order by count(*) desc limit 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What is the most common status across all cities?", "output": "select status from city group by status order by count(*) desc limit 1"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "List the official names of cities that have not held any competition.", "output": "select official_name from city where city_id not in (select host_city_id from farm_competition)"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the official names of cities that have not hosted a farm competition?", "output": "select official_name from city where city_id not in (select host_city_id from farm_competition)"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Show the status shared by cities with population bigger than 1500 and smaller than 500.", "output": "select status from city where population > 1500 intersect select status from city where population < 500"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?", "output": "select status from city where population > 1500 intersect select status from city where population < 500"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Find the official names of cities with population bigger than 1500 or smaller than 500.", "output": "select official_name from city where population > 1500 or population < 500"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the official names of cities that have population over 1500 or less than 500?", "output": "select official_name from city where population > 1500 or population < 500"}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. The status contains values such as Village. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "Show the census ranking of cities whose status are not \"Village\".", "output": "select census_ranking from city where status != \"Village\""}, {"instruction": "farm contains tables such as city, farm, farm_competition, competition_record. Table city has columns such as city_id, official_name, status, area_km_2, population, census_ranking. city_id is the primary key. The status contains values such as Village. Table farm has columns such as farm_id, year, total_horses, working_horses, total_cattle, oxen, bulls, cows, pigs, sheep_and_goats. farm_id is the primary key. Table farm_competition has columns such as competition_id, year, theme, host_city_id, hosts. competition_id is the primary key. Table competition_record has columns such as competition_id, farm_id, rank. competition_id is the primary key. The host_city_id of farm_competition is the foreign key of city_id of city. The farm_id of competition_record is the foreign key of farm_id of farm. The competition_id of competition_record is the foreign key of competition_id of farm_competition.", "input": "What are the census rankings of cities that do not have the status \"Village\"?", "output": "select census_ranking from city where status != \"Village\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "which course has most number of registered students?", "output": "select t1.course_name from courses as t1 join student_course_registrations as t2 on t1.course_id = t2.course_id group by t1.course_id order by count(*) desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What is the name of the course with the most registered students?", "output": "select t1.course_name from courses as t1 join student_course_registrations as t2 on t1.course_id = t2.course_id group by t1.course_id order by count(*) desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "what is id of students who registered some courses but the least number of courses in these students?", "output": "select student_id from student_course_registrations group by student_id order by count(*) limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the students who registered for some courses but had the least number of courses for all students?", "output": "select student_id from student_course_registrations group by student_id order by count(*) limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "what are the first name and last name of all candidates?", "output": "select t2.first_name, t2.last_name from candidates as t1 join people as t2 on t1.candidate_id = t2.person_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the first and last names of all the candidates?", "output": "select t2.first_name, t2.last_name from candidates as t1 join people as t2 on t1.candidate_id = t2.person_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "List the id of students who never attends courses?", "output": "select student_id from students where student_id not in (select student_id from student_course_attendance)"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of every student who has never attended a course?", "output": "select student_id from students where student_id not in (select student_id from student_course_attendance)"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "List the id of students who attended some courses?", "output": "select student_id from student_course_attendance"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of all students who have attended at least one course?", "output": "select student_id from student_course_attendance"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of all students for courses and what are the names of those courses?", "output": "select t1.student_id, t2.course_name from student_course_registrations as t1 join courses as t2 on t1.course_id = t2.course_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What is detail of the student who most recently registered course?", "output": "select t2.student_details from student_course_registrations as t1 join students as t2 on t1.student_id = t2.student_id order by t1.registration_date desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What details do we have on the students who registered for courses most recently?", "output": "select t2.student_details from student_course_registrations as t1 join students as t2 on t1.student_id = t2.student_id order by t1.registration_date desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. The course_name contains values such as English.The course_description contains values such as English. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "How many students attend course English?", "output": "select count(*) from courses as t1 join student_course_attendance as t2 on t1.course_id = t2.course_id where t1.course_name = \"English\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. The course_name contains values such as English.The course_description contains values such as English. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "How many students are attending English courses?", "output": "select count(*) from courses as t1 join student_course_attendance as t2 on t1.course_id = t2.course_id where t1.course_name = \"English\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "How many courses do the student whose id is 171 attend?", "output": "select count(*) from courses as t1 join student_course_attendance as t2 on t1.course_id = t2.course_id where t2.student_id = 171"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "How many courses does the student with id 171 actually attend?", "output": "select count(*) from courses as t1 join student_course_attendance as t2 on t1.course_id = t2.course_id where t2.student_id = 171"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. The email_address contains values such as stanley.monahan@example.org. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "Find id of the candidate whose email is stanley.monahan@example.org?", "output": "select t2.candidate_id from people as t1 join candidates as t2 on t1.person_id = t2.candidate_id where t1.email_address = \"stanley.monahan@example.org\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. The email_address contains values such as stanley.monahan@example.org. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What is the id of the candidate whose email is stanley.monahan@example.org?", "output": "select t2.candidate_id from people as t1 join candidates as t2 on t1.person_id = t2.candidate_id where t1.email_address = \"stanley.monahan@example.org\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "Find id of the candidate who most recently accessed the course?", "output": "select candidate_id from candidate_assessments order by assessment_date desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What is the id of the candidate who most recently accessed the course?", "output": "select candidate_id from candidate_assessments order by assessment_date desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What is detail of the student who registered the most number of courses?", "output": "select t1.student_details from students as t1 join student_course_registrations as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the details of the student who registered for the most number of courses?", "output": "select t1.student_details from students as t1 join student_course_registrations as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "List the id of students who registered some courses and the number of their registered courses?", "output": "select t1.student_id, count(*) from students as t1 join student_course_registrations as t2 on t1.student_id = t2.student_id group by t1.student_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "For every student who is registered for some course, how many courses are they registered for?", "output": "select t1.student_id, count(*) from students as t1 join student_course_registrations as t2 on t1.student_id = t2.student_id group by t1.student_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "How many registed students do each course have? List course name and the number of their registered students?", "output": "select t3.course_name, count(*) from students as t1 join student_course_registrations as t2 on t1.student_id = t2.student_id join courses as t3 on t2.course_id = t3.course_id group by t2.course_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "For each course id, how many students are registered and what are the course names?", "output": "select t3.course_name, count(*) from students as t1 join student_course_registrations as t2 on t1.student_id = t2.student_id join courses as t3 on t2.course_id = t3.course_id group by t2.course_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The asessment_outcome_code contains values such as Pass. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "Find id of candidates whose assessment code is \"Pass\"?", "output": "select candidate_id from candidate_assessments where asessment_outcome_code = \"Pass\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The asessment_outcome_code contains values such as Pass. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the candidates that have an outcome code of Pass?", "output": "select candidate_id from candidate_assessments where asessment_outcome_code = \"Pass\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The asessment_outcome_code contains values such as Fail. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "Find the cell mobile number of the candidates whose assessment code is \"Fail\"?", "output": "select t3.cell_mobile_number from candidates as t1 join candidate_assessments as t2 on t1.candidate_id = t2.candidate_id join people as t3 on t1.candidate_id = t3.person_id where t2.asessment_outcome_code = \"Fail\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The asessment_outcome_code contains values such as Fail. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the cell phone numbers of the candidates that received an assessment code of \"Fail\"?", "output": "select t3.cell_mobile_number from candidates as t1 join candidate_assessments as t2 on t1.candidate_id = t2.candidate_id join people as t3 on t1.candidate_id = t3.person_id where t2.asessment_outcome_code = \"Fail\""}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the id of students who registered course 301?", "output": "select student_id from student_course_attendance where course_id = 301"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the students who registered for course 301?", "output": "select student_id from student_course_attendance where course_id = 301"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What is the id of the student who most recently registered course 301?", "output": "select student_id from student_course_attendance where course_id = 301 order by date_of_attendance desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the students who registered for course 301 most recently?", "output": "select student_id from student_course_attendance where course_id = 301 order by date_of_attendance desc limit 1"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "Find distinct cities of addresses of people?", "output": "select distinct t1.city from addresses as t1 join people_addresses as t2 on t1.address_id = t2.address_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the different cities where people live?", "output": "select distinct t1.city from addresses as t1 join people_addresses as t2 on t1.address_id = t2.address_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "Find distinct cities of address of students?", "output": "select distinct t1.city from addresses as t1 join people_addresses as t2 on t1.address_id = t2.address_id join students as t3 on t2.person_id = t3.student_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the different cities where students live?", "output": "select distinct t1.city from addresses as t1 join people_addresses as t2 on t1.address_id = t2.address_id join students as t3 on t2.person_id = t3.student_id"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "List the names of courses in alphabetical order?", "output": "select course_name from courses order by course_name"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the names of the courses in alphabetical order?", "output": "select course_name from courses order by course_name"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "List the first names of people in alphabetical order?", "output": "select first_name from people order by first_name"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the first names of the people in alphabetical order?", "output": "select first_name from people order by first_name"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the id of students who registered courses or attended courses?", "output": "select student_id from student_course_registrations union select student_id from student_course_attendance"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the students who either registered or attended a course?", "output": "select student_id from student_course_registrations union select student_id from student_course_attendance"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "Find the id of courses which are registered or attended by student whose id is 121?", "output": "select course_id from student_course_registrations where student_id = 121 union select course_id from student_course_attendance where student_id = 121"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the courses that are registered or attended by the student whose id is 121?", "output": "select course_id from student_course_registrations where student_id = 121 union select course_id from student_course_attendance where student_id = 121"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are all info of students who registered courses but not attended courses?", "output": "select * from student_course_registrations where student_id not in (select student_id from student_course_attendance)"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are all details of the students who registered but did not attend any course?", "output": "select * from student_course_registrations where student_id not in (select student_id from student_course_attendance)"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. The course_name contains values such as statistics.The course_description contains values such as statistics. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "List the id of students who registered course statistics in the order of registration date.", "output": "select t2.student_id from courses as t1 join student_course_registrations as t2 on t1.course_id = t2.course_id where t1.course_name = \"statistics\" order by t2.registration_date"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. The course_name contains values such as statistics.The course_description contains values such as statistics. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the students who registered course statistics by order of registration date?", "output": "select t2.student_id from courses as t1 join student_course_registrations as t2 on t1.course_id = t2.course_id where t1.course_name = \"statistics\" order by t2.registration_date"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. The course_name contains values such as statistics.The course_description contains values such as statistics. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "List the id of students who attended statistics courses in the order of attendance date.", "output": "select t2.student_id from courses as t1 join student_course_attendance as t2 on t1.course_id = t2.course_id where t1.course_name = \"statistics\" order by t2.date_of_attendance"}, {"instruction": "student_assessment contains tables such as addresses, people, students, courses, people_addresses, student_course_registrations, student_course_attendance, candidates, candidate_assessments. Table addresses has columns such as address_id, line_1, line_2, city, zip_postcode, state_province_county, country. address_id is the primary key. Table people has columns such as person_id, first_name, middle_name, last_name, cell_mobile_number, email_address, login_name, password. person_id is the primary key. Table students has columns such as student_id, student_details. student_id is the primary key. Table courses has columns such as course_id, course_name, course_description, other_details. course_id is the primary key. The course_name contains values such as statistics.The course_description contains values such as statistics. Table people_addresses has columns such as person_address_id, person_id, address_id, date_from, date_to. person_address_id is the primary key. Table student_course_registrations has columns such as student_id, course_id, registration_date. student_id is the primary key. Table student_course_attendance has columns such as student_id, course_id, date_of_attendance. student_id is the primary key. Table candidates has columns such as candidate_id, candidate_details. candidate_id is the primary key. Table candidate_assessments has columns such as candidate_id, qualification, assessment_date, asessment_outcome_code. candidate_id is the primary key. The student_id of students is the foreign key of person_id of people. The address_id of people_addresses is the foreign key of address_id of addresses. The person_id of people_addresses is the foreign key of person_id of people. The course_id of student_course_registrations is the foreign key of course_id of courses. The student_id of student_course_registrations is the foreign key of student_id of students. The student_id of student_course_attendance is the foreign key of student_id of student_course_registrations. The course_id of student_course_attendance is the foreign key of course_id of student_course_registrations. The candidate_id of candidates is the foreign key of person_id of people. The candidate_id of candidate_assessments is the foreign key of candidate_id of candidates.", "input": "What are the ids of the students who attended courses in the statistics department in order of attendance date.", "output": "select t2.student_id from courses as t1 join student_course_attendance as t2 on t1.course_id = t2.course_id where t1.course_name = \"statistics\" order by t2.date_of_attendance"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Give me the dates when the max temperature was higher than 85.", "output": "select date from weather where max_temperature_f > 85"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the dates with a maximum temperature higher than 85?", "output": "select date from weather where max_temperature_f > 85"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the names of stations that have latitude lower than 37.5?", "output": "select name from station where lat < 37.5"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the names of all stations with a latitude smaller than 37.5?", "output": "select name from station where lat < 37.5"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each city, return the highest latitude among its stations.", "output": "select city, max(lat) from station group by city"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each city, what is the highest latitude for its stations?", "output": "select city, max(lat) from station group by city"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Give me the start station and end station for the trips with the three oldest id.", "output": "select start_station_name, end_station_name from trip order by id limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the station station and end station for the trips with the three smallest ids?", "output": "select start_station_name, end_station_name from trip order by id limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Jose. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the average latitude and longitude of stations located in San Jose city?", "output": "select avg(lat), avg(long) from station where city = \"San Jose\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Jose. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the average latitude and longitude in San Jose?", "output": "select avg(lat), avg(long) from station where city = \"San Jose\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the id of the trip that has the shortest duration?", "output": "select id from trip order by duration limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the id of the shortest trip?", "output": "select id from trip order by duration limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the total and maximum duration of trips with bike id 636?", "output": "select sum(duration), max(duration) from trip where bike_id = 636"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the total and maximum duration for all trips with the bike id 636?", "output": "select sum(duration), max(duration) from trip where bike_id = 636"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each zip code, return the average mean temperature of August there.", "output": "select zip_code, avg(mean_temperature_f) from weather where date like \"8/%\" group by zip_code"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each zip code, what is the average mean temperature for all dates that start with '8'?", "output": "select zip_code, avg(mean_temperature_f) from weather where date like \"8/%\" group by zip_code"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "From the trip record, find the number of unique bikes.", "output": "select count(distinct bike_id) from trip"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many different bike ids are there?", "output": "select count(distinct bike_id) from trip"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the number of distinct cities the stations are located at?", "output": "select count(distinct city) from station"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many different cities have these stations?", "output": "select count(distinct city) from station"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Mountain View. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many stations does Mountain View city has?", "output": "select count(*) from station where city = \"Mountain View\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Mountain View. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many stations are in Mountain View?", "output": "select count(*) from station where city = \"Mountain View\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Return the unique name for stations that have ever had 7 bikes available.", "output": "select distinct t1.name from station as t1 join status as t2 on t1.id = t2.station_id where t2.bikes_available = 7"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the different names for each station that has ever had 7 bikes available?", "output": "select distinct t1.name from station as t1 join status as t2 on t1.id = t2.station_id where t2.bikes_available = 7"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Which start station had the most trips starting from August? Give me the name and id of the station.", "output": "select start_station_name, start_station_id from trip where start_date like \"8/%\" group by start_station_name order by count(*) desc limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the start station's name and id for the one that had the most start trips in August?", "output": "select start_station_name, start_station_id from trip where start_date like \"8/%\" group by start_station_name order by count(*) desc limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Which bike traveled the most often in zip code 94002?", "output": "select bike_id from trip where zip_code = 94002 group by bike_id order by count(*) desc limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the id of the bike that traveled the most in 94002?", "output": "select bike_id from trip where zip_code = 94002 group by bike_id order by count(*) desc limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many days had both mean humidity above 50 and mean visibility above 8?", "output": "select count(*) from weather where mean_humidity > 50 and mean_visibility_miles > 8"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the number of days that had an average humity above 50 and an average visibility above 8?", "output": "select count(*) from weather where mean_humidity > 50 and mean_visibility_miles > 8"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the latitude, longitude, city of the station from which the shortest trip started?", "output": "select t1.lat, t1.long, t1.city from station as t1 join trip as t2 on t1.id = t2.start_station_id order by t2.duration limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the latitude, longitude, and city of the station from which the trip with smallest duration started?", "output": "select t1.lat, t1.long, t1.city from station as t1 join trip as t2 on t1.id = t2.start_station_id order by t2.duration limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Francisco. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids of stations that are located in San Francisco and have average bike availability above 10.", "output": "select id from station where city = \"San Francisco\" intersect select station_id from status group by station_id having avg(bikes_available) > 10"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Francisco. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids of the stations in San Francisco that normally have more than 10 bikes available?", "output": "select id from station where city = \"San Francisco\" intersect select station_id from status group by station_id having avg(bikes_available) > 10"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?", "output": "select t1.name, t1.id from station as t1 join status as t2 on t1.id = t2.station_id group by t2.station_id having avg(t2.bikes_available) > 14 union select name, id from station where installation_date like \"12/%\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the names and ids of all stations that have more than 14 bikes available on average or had bikes installed in December?", "output": "select t1.name, t1.id from station as t1 join status as t2 on t1.id = t2.station_id group by t2.station_id having avg(t2.bikes_available) > 14 union select name, id from station where installation_date like \"12/%\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the 3 most common cloud cover rates in the region of zip code 94107?", "output": "select cloud_cover from weather where zip_code = 94107 group by cloud_cover order by count (*) desc limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the 3 most common cloud covers in the zip code of 94107?", "output": "select cloud_cover from weather where zip_code = 94107 group by cloud_cover order by count (*) desc limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the zip code in which the average mean sea level pressure is the lowest?", "output": "select zip_code from weather group by zip_code order by avg(mean_sea_level_pressure_inches) limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the zip code that has the lowest average mean sea level pressure?", "output": "select zip_code from weather group by zip_code order by avg(mean_sea_level_pressure_inches) limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Palo Alto. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the average bike availability in stations that are not located in Palo Alto?", "output": "select avg(bikes_available) from status where station_id not in (select id from station where city = \"Palo Alto\")"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Palo Alto. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the average bike availablility for stations not in Palo Alto?", "output": "select avg(bikes_available) from status where station_id not in (select id from station where city = \"Palo Alto\")"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the average longitude of stations that never had bike availability more than 10?", "output": "select avg(long) from station where id not in (select station_id from status group by station_id having max(bikes_available) > 10)"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the mean longitude for all stations that have never had more than 10 bikes available?", "output": "select avg(long) from station where id not in (select station_id from status group by station_id having max(bikes_available) > 10)"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "When and in what zip code did max temperature reach 80?", "output": "select date, zip_code from weather where max_temperature_f >= 80"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?", "output": "select date, zip_code from weather where max_temperature_f >= 80"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.", "output": "select t1.id from trip as t1 join weather as t2 on t1.zip_code = t2.zip_code group by t2.zip_code having avg(t2.mean_temperature_f) > 60"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each zip code, find the ids of all trips that have a higher average mean temperature above 60?", "output": "select t1.id from trip as t1 join weather as t2 on t1.zip_code = t2.zip_code group by t2.zip_code having avg(t2.mean_temperature_f) > 60"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each zip code, return how many times max wind speed reached 25?", "output": "select zip_code, count(*) from weather where max_wind_speed_mph >= 25 group by zip_code"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each zip code, how many times has the maximum wind speed reached 25 mph?", "output": "select zip_code, count(*) from weather where max_wind_speed_mph >= 25 group by zip_code"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "On which day and in which zip code was the min dew point lower than any day in zip code 94107?", "output": "select date, zip_code from weather where min_dew_point_f < (select min(min_dew_point_f) from weather where zip_code = 94107)"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?", "output": "select date, zip_code from weather where min_dew_point_f < (select min(min_dew_point_f) from weather where zip_code = 94107)"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each trip, return its ending station's installation date.", "output": "select t1.id, t2.installation_date from trip as t1 join station as t2 on t1.end_station_id = t2.id"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the installation date for each ending station on all the trips?", "output": "select t1.id, t2.installation_date from trip as t1 join station as t2 on t1.end_station_id = t2.id"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Which trip started from the station with the largest dock count? Give me the trip id.", "output": "select t1.id from trip as t1 join station as t2 on t1.start_station_id = t2.id order by t2.dock_count desc limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the id of the trip that started from the station with the highest dock count?", "output": "select t1.id from trip as t1 join station as t2 on t1.start_station_id = t2.id order by t2.dock_count desc limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Francisco. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Count the number of trips that did not end in San Francisco city.", "output": "select count(*) from trip as t1 join station as t2 on t1.end_station_id = t2.id where t2.city != \"San Francisco\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Francisco. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many trips did not end in San Francisco?", "output": "select count(*) from trip as t1 join station as t2 on t1.end_station_id = t2.id where t2.city != \"San Francisco\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The events contains values such as rain, Rain. The station_id of status is the foreign key of id of station.", "input": "In zip code 94107, on which day neither Fog nor Rain was not observed?", "output": "select date from weather where zip_code = 94107 and events != \"Fog\" and events != \"Rain\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "On which day has it neither been foggy nor rained in the zip code of 94107?", "output": "select date from weather where zip_code = 94107 and events != \"Fog\" and events != \"Rain\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids of stations that have latitude above 37.4 and never had bike availability below 7?", "output": "select id from station where lat > 37.4 except select station_id from status group by station_id having min(bikes_available) < 7"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids of all stations that have a latitude above 37.4 and have never had less than 7 bikes available?", "output": "select id from station where lat > 37.4 except select station_id from status group by station_id having min(bikes_available) < 7"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Jose. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are names of stations that have average bike availability above 10 and are not located in San Jose city?", "output": "select t1.name from station as t1 join status as t2 on t1.id = t2.station_id group by t2.station_id having avg(bikes_available) > 10 except select name from station where city = \"San Jose\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as San Jose. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the names of all stations that have more than 10 bikes available and are not located in San Jose?", "output": "select t1.name from station as t1 join status as t2 on t1.id = t2.station_id group by t2.station_id having avg(bikes_available) > 10 except select name from station where city = \"San Jose\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the name, latitude, and city of the station with the lowest latitude?", "output": "select name, lat, city from station order by lat limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the name, latitude, and city of the station that is located the furthest South?", "output": "select name, lat, city from station order by lat limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?", "output": "select date, mean_temperature_f, mean_humidity from weather order by max_gust_speed_mph desc limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?", "output": "select date, mean_temperature_f, mean_humidity from weather order by max_gust_speed_mph desc limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "List the name and the number of stations for all the cities that have at least 15 stations.", "output": "select city, count(*) from station group by city having count(*) >= 15"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the name of every city that has at least 15 stations and how many stations does it have?", "output": "select city, count(*) from station group by city having count(*) >= 15"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Find the ids and names of stations from which at least 200 trips started.", "output": "select start_station_id, start_station_name from trip group by start_station_name having count(*) >= 200"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids and names of all start stations that were the beginning of at least 200 trips?", "output": "select start_station_id, start_station_name from trip group by start_station_name having count(*) >= 200"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Find the zip code in which the average mean visibility is lower than 10.", "output": "select zip_code from weather group by zip_code having avg(mean_visibility_miles) < 10"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each zip code, select all those that have an average mean visiblity below 10.", "output": "select zip_code from weather group by zip_code having avg(mean_visibility_miles) < 10"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "List all the cities in a decreasing order of each city's stations' highest latitude.", "output": "select city from station group by city order by max(lat) desc"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each city, list their names in decreasing order by their highest station latitude.", "output": "select city from station group by city order by max(lat) desc"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.", "output": "select date, cloud_cover from weather order by cloud_cover desc limit 5"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the dates that have the 5 highest cloud cover rates and what are the rates?", "output": "select date, cloud_cover from weather order by cloud_cover desc limit 5"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids and durations of the trips with the top 3 durations?", "output": "select id, duration from trip order by duration desc limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids of the trips that lasted the longest and how long did they last?", "output": "select id, duration from trip order by duration desc limit 3"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each station, return its longitude and the average duration of trips that started from the station.", "output": "select t1.name, t1.long, avg(t2.duration) from station as t1 join trip as t2 on t1.id = t2.start_station_id group by t2.start_station_id"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each start station id, what is its name, longitude and average duration of trips started there?", "output": "select t1.name, t1.long, avg(t2.duration) from station as t1 join trip as t2 on t1.id = t2.start_station_id group by t2.start_station_id"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each station, find its latitude and the minimum duration of trips that ended at the station.", "output": "select t1.name, t1.lat, min(t2.duration) from station as t1 join trip as t2 on t1.id = t2.end_station_id group by t2.end_station_id"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "For each end station id, what is its name, latitude, and minimum duration for trips ended there?", "output": "select t1.name, t1.lat, min(t2.duration) from station as t1 join trip as t2 on t1.id = t2.end_station_id group by t2.end_station_id"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "List all the distinct stations from which a trip of duration below 100 started.", "output": "select distinct start_station_name from trip where duration < 100"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are all the different start station names for a trip that lasted less than 100?", "output": "select distinct start_station_name from trip where duration < 100"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Find all the zip codes in which the max dew point have never reached 70.", "output": "select distinct zip_code from weather except select distinct zip_code from weather where max_dew_point_f >= 70"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are all the different zip codes that have a maximum dew point that was always below 70?", "output": "select distinct zip_code from weather except select distinct zip_code from weather where max_dew_point_f >= 70"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.", "output": "select id from trip where duration >= (select avg(duration) from trip where zip_code = 94103)"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103?", "output": "select id from trip where duration >= (select avg(duration) from trip where zip_code = 94103)"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the dates in which the mean sea level pressure was between 30.3 and 31?", "output": "select date from weather where mean_sea_level_pressure_inches between 30.3 and 31"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the dates that have an average sea level pressure between 30.3 and 31?", "output": "select date from weather where mean_sea_level_pressure_inches between 30.3 and 31"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.", "output": "select date, max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the days that had the smallest temperature range, and what was that range?", "output": "select date, max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f limit 1"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the id and name of the stations that have ever had more than 12 bikes available?", "output": "select distinct t1.id, t1.name from station as t1 join status as t2 on t1.id = t2.station_id where t2.bikes_available > 12"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the different ids and names of the stations that have had more than 12 bikes available?", "output": "select distinct t1.id, t1.name from station as t1 join status as t2 on t1.id = t2.station_id where t2.bikes_available > 12"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place.", "output": "select zip_code from weather group by zip_code having avg(mean_humidity) < 70 intersect select zip_code from trip group by zip_code having count(*) >= 100"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?", "output": "select zip_code from weather group by zip_code having avg(mean_humidity) < 70 intersect select zip_code from trip group by zip_code having count(*) >= 100"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Palo Alto. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?", "output": "select name from station where city = \"Palo Alto\" except select end_station_name from trip group by end_station_name having count(*) > 100"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Palo Alto. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips", "output": "select name from station where city = \"Palo Alto\" except select end_station_name from trip group by end_station_name having count(*) > 100"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Mountain View, Palo Alto. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many trips started from Mountain View city and ended at Palo Alto city?", "output": "select count(*) from station as t1 join trip as t2 join station as t3 join trip as t4 on t1.id = t2.start_station_id and t2.id = t4.id and t3.id = t4.end_station_id where t1.city = \"Mountain View\" and t3.city = \"Palo Alto\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. The city contains values such as Mountain View, Palo Alto. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "How many trips stated from a station in Mountain View and ended at one in Palo Alto?", "output": "select count(*) from station as t1 join trip as t2 join station as t3 join trip as t4 on t1.id = t2.start_station_id and t2.id = t4.id and t3.id = t4.end_station_id where t1.city = \"Mountain View\" and t3.city = \"Palo Alto\""}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the average latitude and longitude of the starting points of all trips?", "output": "select avg(t1.lat), avg(t1.long) from station as t1 join trip as t2 on t1.id = t2.start_station_id"}, {"instruction": "bike_1 contains tables such as station, status, trip, weather. Table station has columns such as id, name, lat, long, dock_count, city, installation_date. id is the primary key. Table status has columns such as station_id, bikes_available, docks_available, time. is the primary key. Table trip has columns such as id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscription_type, zip_code. id is the primary key. Table weather has columns such as date, max_temperature_f, mean_temperature_f, min_temperature_f, max_dew_point_f, mean_dew_point_f, min_dew_point_f, max_humidity, mean_humidity, min_humidity, max_sea_level_pressure_inches, mean_sea_level_pressure_inches, min_sea_level_pressure_inches, max_visibility_miles, mean_visibility_miles, min_visibility_miles, max_wind_speed_mph, mean_wind_speed_mph, max_gust_speed_mph, precipitation_inches, cloud_cover, events, wind_dir_degrees, zip_code. is the primary key. The station_id of status is the foreign key of id of station.", "input": "What is the average latitude and longitude of all starting stations for the trips?", "output": "select avg(t1.lat), avg(t1.long) from station as t1 join trip as t2 on t1.id = t2.start_station_id"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "How many books are there?", "output": "select count(*) from book"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "List the writers of the books in ascending alphabetical order.", "output": "select writer from book order by writer asc"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "List the titles of the books in ascending order of issues.", "output": "select title from book order by issues asc"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The writer contains values such as Elaine Lee. The book_id of publication is the foreign key of book_id of book.", "input": "What are the titles of the books whose writer is not \"Elaine Lee\"?", "output": "select title from book where writer != \"Elaine Lee\""}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "What are the title and issues of the books?", "output": "select title, issues from book"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "What are the dates of publications in descending order of price?", "output": "select publication_date from publication order by price desc"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "What are the distinct publishers of publications with price higher than 5000000?", "output": "select distinct publisher from publication where price > 5000000"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "List the publisher of the publication with the highest price.", "output": "select publisher from publication order by price desc limit 1"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "List the publication dates of publications with 3 lowest prices.", "output": "select publication_date from publication order by price asc limit 3"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Show the title and publication dates of books.", "output": "select t1.title, t2.publication_date from book as t1 join publication as t2 on t1.book_id = t2.book_id"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Show writers who have published a book with price more than 4000000.", "output": "select t1.writer from book as t1 join publication as t2 on t1.book_id = t2.book_id where t2.price > 4000000"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Show the titles of books in descending order of publication price.", "output": "select t1.title from book as t1 join publication as t2 on t1.book_id = t2.book_id order by t2.price desc"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Show publishers that have more than one publication.", "output": "select publisher from publication group by publisher having count(*) > 1"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Show different publishers together with the number of publications they have.", "output": "select publisher, count(*) from publication group by publisher"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Please show the most common publication date.", "output": "select publication_date from publication group by publication_date order by count(*) desc limit 1"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "List the writers who have written more than one book.", "output": "select writer from book group by writer having count(*) > 1"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "List the titles of books that are not published.", "output": "select title from book where book_id not in (select book_id from publication)"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Show the publishers that have publications with price higher than 10000000 and publications with price lower than 5000000.", "output": "select publisher from publication where price > 10000000 intersect select publisher from publication where price < 5000000"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "What is the number of distinct publication dates?", "output": "select count (distinct publication_date) from publication"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "How many distinct publication dates are there in our record?", "output": "select count (distinct publication_date) from publication"}, {"instruction": "book_2 contains tables such as publication, book. Table publication has columns such as publication_id, book_id, publisher, publication_date, price. publication_id is the primary key. The publisher contains values such as Wiley. Table book has columns such as book_id, title, issues, writer. book_id is the primary key. The book_id of publication is the foreign key of book_id of book.", "input": "Show the prices of publications whose publisher is either \"Person\" or \"Wiley\"", "output": "select price from publication where publisher = \"Person\" or publisher = \"Wiley\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "How many actors are there?", "output": "select count(*) from actor"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Count the number of actors.", "output": "select count(*) from actor"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "List the name of actors in ascending alphabetical order.", "output": "select name from actor order by name asc"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of actors, ordered alphabetically?", "output": "select name from actor order by name asc"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the characters and duration of actors?", "output": "select character, duration from actor"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Return the characters and durations for each actor.", "output": "select character, duration from actor"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "List the name of actors whose age is not 20.", "output": "select name from actor where age != 20"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of actors who are not 20 years old?", "output": "select name from actor where age != 20"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the characters of actors in descending order of age?", "output": "select character from actor order by age desc"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Return the characters for actors, ordered by age descending.", "output": "select character from actor order by age desc"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What is the duration of the oldest actor?", "output": "select duration from actor order by age desc limit 1"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Return the duration of the actor with the greatest age.", "output": "select duration from actor order by age desc limit 1"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The nominee contains values such as Bob Fosse. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of musicals with nominee \"Bob Fosse\"?", "output": "select name from musical where nominee = \"Bob Fosse\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The nominee contains values such as Bob Fosse. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Return the names of musicals who have the nominee Bob Fosse.", "output": "select name from musical where nominee = \"Bob Fosse\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The award contains values such as Tony Award. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the distinct nominees of the musicals with the award that is not \"Tony Award\"?", "output": "select distinct nominee from musical where award != \"Tony Award\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The award contains values such as Tony Award. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Return the different nominees of musicals that have an award that is not the Tony Award.", "output": "select distinct nominee from musical where award != \"Tony Award\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show names of actors and names of musicals they are in.", "output": "select t1.name, t2.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of actors and the musicals that they are in?", "output": "select t1.name, t2.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The name contains values such as The Phantom of the Opera. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show names of actors that have appeared in musical with name \"The Phantom of the Opera\".", "output": "select t1.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id where t2.name = \"The phantom of the Opera\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The name contains values such as The Phantom of the Opera. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of actors who have been in the musical titled The Phantom of the Opera?", "output": "select t1.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id where t2.name = \"The phantom of the Opera\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show names of actors in descending order of the year their musical is awarded.", "output": "select t1.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id order by t2.year desc"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of actors ordered descending by the year in which their musical was awarded?", "output": "select t1.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id order by t2.year desc"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show names of musicals and the number of actors who have appeared in the musicals.", "output": "select t2.name, count(*) from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id group by t1.musical_id"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "How many actors have appeared in each musical?", "output": "select t2.name, count(*) from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id group by t1.musical_id"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show names of musicals which have at least three actors.", "output": "select t2.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id group by t1.musical_id having count(*) >= 3"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of musicals who have at 3 or more actors?", "output": "select t2.name from actor as t1 join musical as t2 on t1.musical_id = t2.musical_id group by t1.musical_id having count(*) >= 3"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show different nominees and the number of musicals they have been nominated.", "output": "select nominee, count(*) from musical group by nominee"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "How many musicals has each nominee been nominated for?", "output": "select nominee, count(*) from musical group by nominee"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Please show the nominee who has been nominated the greatest number of times.", "output": "select nominee from musical group by nominee order by count(*) desc limit 1"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Who is the nominee who has been nominated for the most musicals?", "output": "select nominee from musical group by nominee order by count(*) desc limit 1"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "List the most common result of the musicals.", "output": "select result from musical group by result order by count(*) desc limit 1"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Return the most frequent result across all musicals.", "output": "select result from musical group by result order by count(*) desc limit 1"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "List the nominees that have been nominated more than two musicals.", "output": "select nominee from musical group by nominee having count(*) > 2"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Who are the nominees who have been nominated more than two times?", "output": "select nominee from musical group by nominee having count(*) > 2"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "List the name of musicals that do not have actors.", "output": "select name from musical where musical_id not in (select musical_id from actor)"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "What are the names of musicals who have no actors?", "output": "select name from musical where musical_id not in (select musical_id from actor)"}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The award contains values such as Drama Desk Award, Tony Award.The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show the nominees that have nominated musicals for both \"Tony Award\" and \"Drama Desk Award\".", "output": "select nominee from musical where award = \"Tony Award\" intersect select nominee from musical where award = \"Drama desk Award\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The award contains values such as Drama Desk Award, Tony Award.The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Who are the nominees who have been nominated for both a Tony Award and a Drama Desk Award?", "output": "select nominee from musical where award = \"Tony Award\" intersect select nominee from musical where award = \"Drama desk Award\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The nominee contains values such as Cleavant Derricks, Bob Fosse. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Show the musical nominee with award \"Bob Fosse\" or \"Cleavant Derricks\".", "output": "select nominee from musical where award = \"Tony Award\" or award = \"Cleavant Derricks\""}, {"instruction": "musical contains tables such as musical, actor. Table musical has columns such as musical_id, name, year, award, category, nominee, result. musical_id is the primary key. The nominee contains values such as Cleavant Derricks, Bob Fosse.The result contains values such as Nominated. Table actor has columns such as actor_id, name, musical_id, character, duration, age. actor_id is the primary key. The musical_id of actor is the foreign key of actor_id of actor.", "input": "Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?", "output": "select nominee from musical where award = \"Tony Award\" or award = \"Cleavant Derricks\""}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The name contains values such as Mary. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the emails of the user named \"Mary\".", "output": "select email from user_profiles where name = 'Mary'"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The name contains values such as Iron Man. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "What is the partition id of the user named \"Iron Man\".", "output": "select partitionid from user_profiles where name = 'Iron Man'"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "How many users are there?", "output": "select count(*) from user_profiles"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "How many followers does each user have?", "output": "select count(*) from follows"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the number of followers for each user.", "output": "select count(*) from follows group by f1"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the number of tweets in record.", "output": "select count(*) from tweets"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the number of users who posted some tweets.", "output": "select count(distinct uid) from tweets"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name and email of the user whose name contains the word \u2018Swift\u2019.", "output": "select name, email from user_profiles where name like '%swift%'"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the names of users whose emails contain \u2018superstar\u2019 or \u2018edu\u2019.", "output": "select name from user_profiles where email like '%superstar%' or email like '%edu%'"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Return the text of tweets about the topic 'intern'.", "output": "select text from tweets where text like '%intern%'"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name and email of the users who have more than 1000 followers.", "output": "select name, email from user_profiles where followers > 1000"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The name contains values such as Tyler Swift. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the names of the users whose number of followers is greater than that of the user named \"Tyler Swift\".", "output": "select t1.name from user_profiles as t1 join follows as t2 on t1.uid = t2.f1 group by t2.f1 having count(*) > (select count(*) from user_profiles as t1 join follows as t2 on t1.uid = t2.f1 where t1.name = 'Tyler Swift')"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name and email for the users who have more than one follower.", "output": "select t1.name, t1.email from user_profiles as t1 join follows as t2 on t1.uid = t2.f1 group by t2.f1 having count(*) > 1"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the names of users who have more than one tweet.", "output": "select t1.name from user_profiles as t1 join tweets as t2 on t1.uid = t2.uid group by t2.uid having count(*) > 1"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The name contains values such as Susan, Mary. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the id of users who are followed by Mary and Susan.", "output": "select t2.f1 from user_profiles as t1 join follows as t2 on t1.uid = t2.f2 where t1.name = \"Mary\" intersect select t2.f1 from user_profiles as t1 join follows as t2 on t1.uid = t2.f2 where t1.name = \"Susan\""}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The name contains values such as Susan, Mary. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the id of users who are followed by Mary or Susan.", "output": "select t2.f1 from user_profiles as t1 join follows as t2 on t1.uid = t2.f2 where t1.name = \"Mary\" or t1.name = \"Susan\""}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name of the user who has the largest number of followers.", "output": "select name from user_profiles order by followers desc limit 1"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name and email of the user followed by the least number of people.", "output": "select name, email from user_profiles order by followers limit 1"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "List the name and number of followers for each user, and sort the results by the number of followers in descending order.", "output": "select name, followers from user_profiles order by followers desc"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "List the names of 5 users followed by the largest number of other users.", "output": "select name from user_profiles order by followers desc limit 5"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "List the text of all tweets in the order of date.", "output": "select text from tweets order by createdate"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name of each user and number of tweets tweeted by each of them.", "output": "select t1.name, count(*) from user_profiles as t1 join tweets as t2 on t1.uid = t2.uid group by t2.uid"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name and partition id for users who tweeted less than twice.", "output": "select t1.name, t1.partitionid from user_profiles as t1 join tweets as t2 on t1.uid = t2.uid group by t2.uid having count(*) < 2"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the name of the user who tweeted more than once, and number of tweets tweeted by them.", "output": "select t1.name, count(*) from user_profiles as t1 join tweets as t2 on t1.uid = t2.uid group by t2.uid having count(*) > 1"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the average number of followers for the users who do not have any tweet.", "output": "select avg(followers) from user_profiles where uid not in (select uid from tweets)"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the average number of followers for the users who had some tweets.", "output": "select avg(followers) from user_profiles where uid in (select uid from tweets)"}, {"instruction": "twitter_1 contains tables such as follows, tweets, user_profiles. Table follows has columns such as f1, f2. f1 is the primary key. Table tweets has columns such as id, uid, text, createdate. id is the primary key. Table user_profiles has columns such as uid, name, email, partitionid, followers. uid is the primary key. The f2 of follows is the foreign key of uid of user_profiles. The f1 of follows is the foreign key of uid of user_profiles. The uid of tweets is the foreign key of uid of user_profiles.", "input": "Find the maximum and total number of followers of all users.", "output": "select max(followers), sum(followers) from user_profiles"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the names of all the catalog entries.", "output": "select distinct(catalog_entry_name) from catalog_contents"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are all the catalog entry names?", "output": "select distinct(catalog_entry_name) from catalog_contents"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the list of attribute data types possessed by more than 3 attribute definitions.", "output": "select attribute_data_type from attribute_definitions group by attribute_data_type having count(*) > 3"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are the attribute data types with more than 3 attribute definitions?", "output": "select attribute_data_type from attribute_definitions group by attribute_data_type having count(*) > 3"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. The attribute_name contains values such as Green. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What is the attribute data type of the attribute with name \"Green\"?", "output": "select attribute_data_type from attribute_definitions where attribute_name = \"Green\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. The attribute_name contains values such as Green. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the attribute data type for the attribute named \"Green\".", "output": "select attribute_data_type from attribute_definitions where attribute_name = \"Green\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the name and level of catalog structure with level between 5 and 10.", "output": "select catalog_level_name, catalog_level_number from catalog_structure where catalog_level_number between 5 and 10"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are the name and level of catalog structure with level number between 5 and 10", "output": "select catalog_level_name, catalog_level_number from catalog_structure where catalog_level_number between 5 and 10"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find all the catalog publishers whose name contains \"Murray\"", "output": "select distinct(catalog_publisher) from catalogs where catalog_publisher like \"%murray%\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which catalog publishers have substring \"Murray\" in their names?", "output": "select distinct(catalog_publisher) from catalogs where catalog_publisher like \"%murray%\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which catalog publisher has published the most catalogs?", "output": "select catalog_publisher from catalogs group by catalog_publisher order by count(*) desc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the catalog publisher that has the most catalogs.", "output": "select catalog_publisher from catalogs group by catalog_publisher order by count(*) desc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the names and publication dates of all catalogs that have catalog level number greater than 5.", "output": "select t1.catalog_name, t1.date_of_publication from catalogs as t1 join catalog_structure as t2 on t1.catalog_id = t2.catalog_id where catalog_level_number > 5"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are the name and publication date of the catalogs with catalog level number above 5?", "output": "select t1.catalog_name, t1.date_of_publication from catalogs as t1 join catalog_structure as t2 on t1.catalog_id = t2.catalog_id where catalog_level_number > 5"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are the entry names of catalog with the attribute possessed by most entries.", "output": "select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.attribute_value = (select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count(*) desc limit 1)"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the entry names of the catalog with the attribute that have the most entries.", "output": "select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.attribute_value = (select attribute_value from catalog_contents_additional_attributes group by attribute_value order by count(*) desc limit 1)"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What is the entry name of the most expensive catalog (in USD)?", "output": "select catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the entry name of the catalog with the highest price (in USD).", "output": "select catalog_entry_name from catalog_contents order by price_in_dollars desc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What is the level name of the cheapest catalog (in USD)?", "output": "select t2.catalog_level_name from catalog_contents as t1 join catalog_structure as t2 on t1.catalog_level_number = t2.catalog_level_number order by t1.price_in_dollars limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the level name of the catalog with the lowest price (in USD).", "output": "select t2.catalog_level_name from catalog_contents as t1 join catalog_structure as t2 on t1.catalog_level_number = t2.catalog_level_number order by t1.price_in_dollars limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are the average and minimum price (in Euro) of all products?", "output": "select avg(price_in_euros), min(price_in_euros) from catalog_contents"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Give me the average and minimum price (in Euro) of the products.", "output": "select avg(price_in_euros), min(price_in_euros) from catalog_contents"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. The catalog_level_name contains values such as Product. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What is the product with the highest height? Give me the catalog entry name.", "output": "select catalog_entry_name from catalog_contents order by height desc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which catalog content has the highest height? Give me the catalog entry name.", "output": "select catalog_entry_name from catalog_contents order by height desc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. The catalog_level_name contains values such as Product. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the name of the product that has the smallest capacity.", "output": "select catalog_entry_name from catalog_contents order by capacity asc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which catalog content has the smallest capacity? Return the catalog entry name.", "output": "select catalog_entry_name from catalog_contents order by capacity asc limit 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the names of all the products whose stock number starts with \"2\".", "output": "select catalog_entry_name from catalog_contents where product_stock_number like \"2%\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. The catalog_level_name contains values such as Product. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which catalog contents have a product stock number that starts from \"2\"? Show the catalog entry names.", "output": "select catalog_entry_name from catalog_contents where product_stock_number like \"2%\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the names of catalog entries with level number 8.", "output": "select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.catalog_level_number = \"8\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are the names of catalog entries with level number 8?", "output": "select t1.catalog_entry_name from catalog_contents as t1 join catalog_contents_additional_attributes as t2 on t1.catalog_entry_id = t2.catalog_entry_id where t2.catalog_level_number = \"8\""}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the names of the products with length smaller than 3 or height greater than 5.", "output": "select catalog_entry_name from catalog_contents where length < 3 or width > 5"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which catalog contents have length below 3 or above 5? Find the catalog entry names.", "output": "select catalog_entry_name from catalog_contents where length < 3 or width > 5"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the name and attribute ID of the attribute definitions with attribute value 0.", "output": "select t1.attribute_name, t1.attribute_id from attribute_definitions as t1 join catalog_contents_additional_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.attribute_value = 0"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.", "output": "select t1.attribute_name, t1.attribute_id from attribute_definitions as t1 join catalog_contents_additional_attributes as t2 on t1.attribute_id = t2.attribute_id where t2.attribute_value = 0"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the name and capacity of products with price greater than 700 (in USD).", "output": "select catalog_entry_name, capacity from catalog_contents where price_in_dollars > 700"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.", "output": "select catalog_entry_name, capacity from catalog_contents where price_in_dollars > 700"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the dates on which more than one revisions were made.", "output": "select date_of_latest_revision from catalogs group by date_of_latest_revision having count(*) > 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "On which days more than one revisions were made on catalogs.", "output": "select date_of_latest_revision from catalogs group by date_of_latest_revision having count(*) > 1"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "How many products are there in the records?", "output": "select count(*) from catalog_contents"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Find the total number of catalog contents.", "output": "select count(*) from catalog_contents"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "Name all the products with next entry ID greater than 8.", "output": "select catalog_entry_name from catalog_contents where next_entry_id > 8"}, {"instruction": "product_catalog contains tables such as attribute_definitions, catalogs, catalog_structure, catalog_contents, catalog_contents_additional_attributes. Table attribute_definitions has columns such as attribute_id, attribute_name, attribute_data_type. attribute_id is the primary key. Table catalogs has columns such as catalog_id, catalog_name, catalog_publisher, date_of_publication, date_of_latest_revision. catalog_id is the primary key. Table catalog_structure has columns such as catalog_level_number, catalog_id, catalog_level_name. catalog_level_number is the primary key. Table catalog_contents has columns such as catalog_entry_id, catalog_level_number, parent_entry_id, previous_entry_id, next_entry_id, catalog_entry_name, product_stock_number, price_in_dollars, price_in_euros, price_in_pounds, capacity, length, height, width. catalog_entry_id is the primary key. Table catalog_contents_additional_attributes has columns such as catalog_entry_id, catalog_level_number, attribute_id, attribute_value. is the primary key. The catalog_id of catalog_structure is the foreign key of catalog_id of catalogs. The catalog_level_number of catalog_contents is the foreign key of catalog_level_number of catalog_structure. The catalog_level_number of catalog_contents_additional_attributes is the foreign key of catalog_level_number of catalog_structure. The catalog_entry_id of catalog_contents_additional_attributes is the foreign key of catalog_entry_id of catalog_contents.", "input": "What are the catalog entry names of the products with next entry ID above 8?", "output": "select catalog_entry_name from catalog_contents where next_entry_id > 8"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "How many aircrafts do we have?", "output": "select count(*) from aircraft"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "How many aircrafts exist in the database?", "output": "select count(*) from aircraft"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show name and distance for all aircrafts.", "output": "select name, distance from aircraft"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names and distances for all airplanes?", "output": "select name, distance from aircraft"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show ids for all aircrafts with more than 1000 distance.", "output": "select aid from aircraft where distance > 1000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the ids of all aircrafts that can cover a distance of more than 1000?", "output": "select aid from aircraft where distance > 1000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "How many aircrafts have distance between 1000 and 5000?", "output": "select count(*) from aircraft where distance between 1000 and 5000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the count of aircrafts that have a distance between 1000 and 5000?", "output": "select count(*) from aircraft where distance between 1000 and 5000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name and distance for aircraft with id 12?", "output": "select name, distance from aircraft where aid = 12"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name and distance for the aircraft that has an id of 12?", "output": "select name, distance from aircraft where aid = 12"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the minimum, average, and maximum distance of all aircrafts.", "output": "select min(distance), avg(distance), max(distance) from aircraft"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Return the minimum, average and maximum distances traveled across all aircrafts.", "output": "select min(distance), avg(distance), max(distance) from aircraft"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the id and name of the aircraft with the maximum distance.", "output": "select aid, name from aircraft order by distance desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the id and name of the aircraft that can cover the maximum distance?", "output": "select aid, name from aircraft order by distance desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the name of aircrafts with top three lowest distances.", "output": "select name from aircraft order by distance limit 3"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the aircrafts with top 3 shortest lengthes? List their names.", "output": "select name from aircraft order by distance limit 3"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show names for all aircrafts with distances more than the average.", "output": "select name from aircraft where distance > (select avg(distance) from aircraft)"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names of all aircrafts that can cover more distances than average?", "output": "select name from aircraft where distance > (select avg(distance) from aircraft)"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "How many employees do we have?", "output": "select count(*) from employee"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the number of employees?", "output": "select count(*) from employee"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show name and salary for all employees sorted by salary.", "output": "select name, salary from employee order by salary"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name and salary of all employees in order of salary?", "output": "select name, salary from employee order by salary"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show ids for all employees with at least 100000 salary.", "output": "select eid from employee where salary > 100000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the id of every employee who has at least a salary of 100000?", "output": "select eid from employee where salary > 100000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "How many employees have salary between 100000 and 200000?", "output": "select count(*) from employee where salary between 100000 and 200000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the number of employees that have a salary between 100000 and 200000?", "output": "select count(*) from employee where salary between 100000 and 200000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name and salary for employee with id 242518965?", "output": "select name, salary from employee where eid = 242518965"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name and salary of the employee with the id 242518965?", "output": "select name, salary from employee where eid = 242518965"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is average and maximum salary of all employees.", "output": "select avg(salary), max(salary) from employee"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the average and largest salary of all employees?", "output": "select avg(salary), max(salary) from employee"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the id and name of the employee with maximum salary.", "output": "select eid, name from employee order by salary desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the id and name of the employee with the highest salary?", "output": "select eid, name from employee order by salary desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the name of employees with three lowest salaries.", "output": "select name from employee order by salary asc limit 3"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name of the 3 employees who get paid the least?", "output": "select name from employee order by salary asc limit 3"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show names for all employees with salary more than the average.", "output": "select name from employee where salary > (select avg(salary) from employee)"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names of all employees who have a salary higher than average?", "output": "select name from employee where salary > (select avg(salary) from employee)"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. The name contains values such as Mark Young. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the id and salary of Mark Young.", "output": "select eid, salary from employee where name = 'Mark Young'"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. The name contains values such as Mark Young. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the id and salary of the employee named Mark Young?", "output": "select eid, salary from employee where name = 'Mark Young'"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "How many flights do we have?", "output": "select count(*) from flight"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the number of flights?", "output": "select count(*) from flight"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show flight number, origin, destination of all flights in the alphabetical order of the departure cities.", "output": "select flno, origin, destination from flight order by origin"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the flight number, origin, and destination for all flights in alphabetical order by departure cities?", "output": "select flno, origin, destination from flight order by origin"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The origin contains values such as Los Angeles.The destination contains values such as Los Angeles. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show all flight number from Los Angeles.", "output": "select flno from flight where origin = \"Los Angeles\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The origin contains values such as Los Angeles.The destination contains values such as Los Angeles. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the numbers of all flights coming from Los Angeles?", "output": "select flno from flight where origin = \"Los Angeles\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The destination contains values such as Honolulu. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show origins of all flights with destination Honolulu.", "output": "select origin from flight where destination = \"Honolulu\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The destination contains values such as Honolulu. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the origins of all flights that are headed to Honolulu?", "output": "select origin from flight where destination = \"Honolulu\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The origin contains values such as Los Angeles.The destination contains values such as Los Angeles, Honolulu. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.", "output": "select departure_date, arrival_date from flight where origin = \"Los Angeles\" and destination = \"Honolulu\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The destination contains values such as Honolulu. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the departure and arrival dates of all flights from LA to Honolulu?", "output": "select departure_date, arrival_date from flight where origin = \"Los Angeles\" and destination = \"Honolulu\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show flight number for all flights with more than 2000 distance.", "output": "select flno from flight where distance > 2000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the numbers of all flights that can cover a distance of more than 2000?", "output": "select flno from flight where distance > 2000"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The origin contains values such as Los Angeles.The destination contains values such as Los Angeles, Honolulu. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the average price for flights from Los Angeles to Honolulu.", "output": "select avg(price) from flight where origin = \"Los Angeles\" and destination = \"Honolulu\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The destination contains values such as Honolulu. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the average price for flights from LA to Honolulu?", "output": "select avg(price) from flight where origin = \"Los Angeles\" and destination = \"Honolulu\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show origin and destination for flights with price higher than 300.", "output": "select origin, destination from flight where price > 300"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the origin and destination for all flights whose price is higher than 300?", "output": "select origin, destination from flight where price > 300"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the flight number and distance of the flight with maximum price.", "output": "select flno, distance from flight order by price desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the flight number and its distance for the one with the maximum price?", "output": "select flno, distance from flight order by price desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the flight number of flights with three lowest distances.", "output": "select flno from flight order by distance asc limit 3"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the numbers of the shortest flights?", "output": "select flno from flight order by distance asc limit 3"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. The origin contains values such as Los Angeles.The destination contains values such as Los Angeles. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the average distance and average price for flights from Los Angeles.", "output": "select avg(distance), avg(price) from flight where origin = \"Los Angeles\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the average distance and price for all flights from LA?", "output": "select avg(distance), avg(price) from flight where origin = \"Los Angeles\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show all origins and the number of flights from each origin.", "output": "select origin, count(*) from flight group by origin"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "For each origin, how many flights came from there?", "output": "select origin, count(*) from flight group by origin"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show all destinations and the number of flights to each destination.", "output": "select destination, count(*) from flight group by destination"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the destinations and number of flights to each one?", "output": "select destination, count(*) from flight group by destination"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Which origin has most number of flights?", "output": "select origin from flight group by origin order by count(*) desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What place has the most flights coming from there?", "output": "select origin from flight group by origin order by count(*) desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Which destination has least number of flights?", "output": "select destination from flight group by destination order by count(*) limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What destination has the fewest number of flights?", "output": "select destination from flight group by destination order by count(*) limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the aircraft name for the flight with number 99", "output": "select t2.name from flight as t1 join aircraft as t2 on t1.aid = t2.aid where t1.flno = 99"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name of the aircraft that was on flight number 99?", "output": "select t2.name from flight as t1 join aircraft as t2 on t1.aid = t2.aid where t1.flno = 99"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. The name contains values such as Airbus A340-300. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show all flight numbers with aircraft Airbus A340-300.", "output": "select t1.flno from flight as t1 join aircraft as t2 on t1.aid = t2.aid where t2.name = \"Airbus a340-300\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. The name contains values such as Airbus A340-300. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the flight numbers for the aircraft Airbus A340-300?", "output": "select t1.flno from flight as t1 join aircraft as t2 on t1.aid = t2.aid where t2.name = \"Airbus a340-300\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show aircraft names and number of flights for each aircraft.", "output": "select t2.name, count(*) from flight as t1 join aircraft as t2 on t1.aid = t2.aid group by t1.aid"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name of each aircraft and how many flights does each one complete?", "output": "select t2.name, count(*) from flight as t1 join aircraft as t2 on t1.aid = t2.aid group by t1.aid"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show names for all aircraft with at least two flights.", "output": "select t2.name from flight as t1 join aircraft as t2 on t1.aid = t2.aid group by t1.aid having count(*) >= 2"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names for all aircrafts with at least 2 flights?", "output": "select t2.name from flight as t1 join aircraft as t2 on t1.aid = t2.aid group by t1.aid having count(*) >= 2"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "How many employees have certificate.", "output": "select count(distinct eid) from certificate"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the count of distinct employees with certificates?", "output": "select count(distinct eid) from certificate"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show ids for all employees who don't have a certificate.", "output": "select eid from employee except select eid from certificate"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the ids of all employees that don't have certificates?", "output": "select eid from employee except select eid from certificate"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. The name contains values such as John Williams. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show names for all aircrafts of which John Williams has certificates.", "output": "select t3.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t1.name = \"John Williams\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. The name contains values such as John Williams. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names of all aircrafts that John Williams have certificates to be able to fly?", "output": "select t3.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t1.name = \"John Williams\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. The name contains values such as Boeing 737-800. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show names for all employees who have certificate of Boeing 737-800.", "output": "select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Boeing 737-800\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. The name contains values such as Boeing 737-800. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names of all employees who have a certificate to fly Boeing 737-800?", "output": "select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Boeing 737-800\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. The name contains values such as Airbus A340-300, Boeing 737-800. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.", "output": "select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Boeing 737-800\" intersect select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Airbus a340-300\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. The name contains values such as Airbus A340-300, Boeing 737-800. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?", "output": "select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Boeing 737-800\" intersect select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Airbus a340-300\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. The name contains values such as Boeing 737-800. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show names for all employees who do not have certificate of Boeing 737-800.", "output": "select name from employee except select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Boeing 737-800\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names of all employees who are not certified to fly Boeing 737-800s?", "output": "select name from employee except select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.name = \"Boeing 737-800\""}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the name of aircraft which fewest people have its certificate.", "output": "select t2.name from certificate as t1 join aircraft as t2 on t2.aid = t1.aid group by t1.aid order by count(*) desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What are the names of the aircraft that the least people are certified to fly?", "output": "select t2.name from certificate as t1 join aircraft as t2 on t2.aid = t1.aid group by t1.aid order by count(*) desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "Show the name and distance of the aircrafts with more than 5000 distance and which at least 5 people have its certificate.", "output": "select t2.name from certificate as t1 join aircraft as t2 on t2.aid = t1.aid where t2.distance > 5000 group by t1.aid order by count(*) >= 5"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?", "output": "select t2.name from certificate as t1 join aircraft as t2 on t2.aid = t1.aid where t2.distance > 5000 group by t1.aid order by count(*) >= 5"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "what is the salary and name of the employee who has the most number of aircraft certificates?", "output": "select t1.name, t1.salary from employee as t1 join certificate as t2 on t1.eid = t2.eid group by t1.eid order by count(*) desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the salaray and name of the employee that is certified to fly the most planes?", "output": "select t1.name, t1.salary from employee as t1 join certificate as t2 on t1.eid = t2.eid group by t1.eid order by count(*) desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the salary and name of the employee who has the most number of certificates on aircrafts with distance more than 5000?", "output": "select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.distance > 5000 group by t1.eid order by count(*) desc limit 1"}, {"instruction": "flight_1 contains tables such as flight, aircraft, employee, certificate. Table flight has columns such as flno, origin, destination, distance, departure_date, arrival_date, price, aid. flno is the primary key. Table aircraft has columns such as aid, name, distance. aid is the primary key. Table employee has columns such as eid, name, salary. eid is the primary key. Table certificate has columns such as eid, aid. eid is the primary key. The aid of flight is the foreign key of aid of aircraft. The aid of certificate is the foreign key of aid of aircraft. The eid of certificate is the foreign key of eid of employee.", "input": "What is the salaray and name of the employee with the most certificates to fly planes more than 5000?", "output": "select t1.name from employee as t1 join certificate as t2 on t1.eid = t2.eid join aircraft as t3 on t3.aid = t2.aid where t3.distance > 5000 group by t1.eid order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many allergies are there?", "output": "select count(distinct allergy) from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many allergy entries are there?", "output": "select count(distinct allergy) from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many different allergy types exist?", "output": "select count(distinct allergytype) from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many distinct allergies are there?", "output": "select count(distinct allergytype) from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all allergy types.", "output": "select distinct allergytype from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the different allergy types?", "output": "select distinct allergytype from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all allergies and their types.", "output": "select allergy, allergytype from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the allergies and their types?", "output": "select allergy, allergytype from allergy_type"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all allergies with type food.", "output": "select distinct allergy from allergy_type where allergytype = \"food\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are all the different food allergies?", "output": "select distinct allergy from allergy_type where allergytype = \"food\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What is the type of allergy Cat?", "output": "select allergytype from allergy_type where allergy = \"Cat\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What is allergy type of a cat allergy?", "output": "select allergytype from allergy_type where allergy = \"Cat\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as animal. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many allergies have type animal?", "output": "select count(*) from allergy_type where allergytype = \"animal\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as animal. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many animal type allergies exist?", "output": "select count(*) from allergy_type where allergytype = \"animal\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all allergy types and the number of allergies in each type.", "output": "select allergytype, count(*) from allergy_type group by allergytype"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the allergy types and how many allergies correspond to each one?", "output": "select allergytype, count(*) from allergy_type group by allergytype"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which allergy type has most number of allergies?", "output": "select allergytype from allergy_type group by allergytype order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which allergy type is most common?", "output": "select allergytype from allergy_type group by allergytype order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which allergy type has least number of allergies?", "output": "select allergytype from allergy_type group by allergytype order by count(*) asc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which allergy type is the least common?", "output": "select allergytype from allergy_type group by allergytype order by count(*) asc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are there?", "output": "select count(*) from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What is the total number of students?", "output": "select count(*) from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show first name and last name for all students.", "output": "select fname, lname from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the full names of all students", "output": "select fname, lname from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many different advisors are listed?", "output": "select count(distinct advisor) from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many advisors are there?", "output": "select count(distinct advisor) from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all majors.", "output": "select distinct major from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the different majors?", "output": "select distinct major from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all cities where students live.", "output": "select distinct city_code from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What cities do students live in?", "output": "select distinct city_code from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show first name, last name, age for all female students. Their sex is F.", "output": "select fname, lname, age from student where sex = 'F'"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the full names and ages for all female students whose sex is F?", "output": "select fname, lname, age from student where sex = 'F'"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show student ids for all male students.", "output": "select stuid from student where sex = 'M'"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the student ids for all male students?", "output": "select stuid from student where sex = 'M'"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are age 18?", "output": "select count(*) from student where age = 18"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are 18 years old?", "output": "select count(*) from student where age = 18"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all student ids who are older than 20.", "output": "select stuid from student where age > 20"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the student ids for students over 20 years old?", "output": "select stuid from student where age > 20"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Kim. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which city does the student whose last name is \"Kim\" live in?", "output": "select city_code from student where lname = \"Kim\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Kim. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Give the city that the student whose family name is Kim lives in.", "output": "select city_code from student where lname = \"Kim\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Who is the advisor of student with ID 1004?", "output": "select advisor from student where stuid = 1004"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Who advises student 1004?", "output": "select advisor from student where stuid = 1004"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as HKG, CHI. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students live in HKG or CHI?", "output": "select count(*) from student where city_code = \"HKG\" or city_code = \"CHI\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as HKG, CHI. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Give the number of students living in either HKG or CHI.", "output": "select count(*) from student where city_code = \"HKG\" or city_code = \"CHI\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show the minimum, average, and maximum age of all students.", "output": "select min(age), avg(age), max(age) from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What is the minimum, mean, and maximum age across all students?", "output": "select min(age), avg(age), max(age) from student"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What is the last name of the youngest student?", "output": "select lname from student where age = (select min(age) from student)"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Provide the last name of the youngest student.", "output": "select lname from student where age = (select min(age) from student)"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show the student id of the oldest student.", "output": "select stuid from student where age = (select max(age) from student)"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What student id corresponds to the oldest student?", "output": "select stuid from student where age = (select max(age) from student)"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all majors and corresponding number of students.", "output": "select major, count(*) from student group by major"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are there for each major?", "output": "select major, count(*) from student group by major"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which major has most number of students?", "output": "select major from student group by major order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What is the largest major?", "output": "select major from student group by major order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all ages and corresponding number of students.", "output": "select age, count(*) from student group by age"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How old is each student and how many students are each age?", "output": "select age, count(*) from student group by age"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show the average age for male and female students.", "output": "select avg(age), sex from student group by sex"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the average ages for male and female students?", "output": "select avg(age), sex from student group by sex"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all cities and corresponding number of students.", "output": "select city_code, count(*) from student group by city_code"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students live in each city?", "output": "select city_code, count(*) from student group by city_code"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all advisors and corresponding number of students.", "output": "select advisor, count(*) from student group by advisor"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students does each advisor have?", "output": "select advisor, count(*) from student group by advisor"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which advisor has most number of students?", "output": "select advisor from student group by advisor order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Give the advisor with the most students.", "output": "select advisor from student group by advisor order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students have cat allergies?", "output": "select count(*) from has_allergy where allergy = \"Cat\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are affected by cat allergies?", "output": "select count(*) from has_allergy where allergy = \"Cat\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all student IDs who have at least two allergies.", "output": "select stuid from has_allergy group by stuid having count(*) >= 2"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the students ids of students who have more than one allergy?", "output": "select stuid from has_allergy group by stuid having count(*) >= 2"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the student ids of students who don't have any allergies?", "output": "select stuid from student except select stuid from has_allergy"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which students are unaffected by allergies?", "output": "select stuid from student except select stuid from has_allergy"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Milk, Eggs. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Milk, Eggs. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many female students have milk or egg allergies?", "output": "select count(*) from has_allergy as t1 join student as t2 on t1.stuid = t2.stuid where t2.sex = \"F\" and t1.allergy = \"Milk\" or t1.allergy = \"Eggs\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Eggs, Milk. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Eggs, Milk. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students who are female are allergic to milk or eggs?", "output": "select count(*) from has_allergy as t1 join student as t2 on t1.stuid = t2.stuid where t2.sex = \"F\" and t1.allergy = \"Milk\" or t1.allergy = \"Eggs\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students have a food allergy?", "output": "select count(*) from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are affected by food related allergies?", "output": "select count(*) from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which allergy has most number of students affected?", "output": "select allergy from has_allergy group by allergy order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Which allergy is the most common?", "output": "select allergy from has_allergy group by allergy order by count(*) desc limit 1"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all allergies with number of students affected.", "output": "select allergy, count(*) from has_allergy group by allergy"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students have each different allergy?", "output": "select allergy, count(*) from has_allergy group by allergy"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Show all allergy type with number of students affected.", "output": "select t2.allergytype, count(*) from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy group by t2.allergytype"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are affected by each allergy type?", "output": "select t2.allergytype, count(*) from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy group by t2.allergytype"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat, Milk. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat, Milk. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Find the last name and age of the student who has allergy to both milk and cat.", "output": "select lname, age from student where stuid in (select stuid from has_allergy where allergy = \"Milk\" intersect select stuid from has_allergy where allergy = \"Cat\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat, Milk. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat, Milk. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the last names and ages of the students who are allergic to milk and cat?", "output": "select lname, age from student where stuid in (select stuid from has_allergy where allergy = \"Milk\" intersect select stuid from has_allergy where allergy = \"Cat\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Lisa. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the allergies and their types that the student with first name Lisa has? And order the result by name of allergies.", "output": "select t1.allergy, t1.allergytype from allergy_type as t1 join has_allergy as t2 on t1.allergy = t2.allergy join student as t3 on t3.stuid = t2.stuid where t3.fname = \"Lisa\" order by t1.allergy"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Lisa. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.", "output": "select t1.allergy, t1.allergytype from allergy_type as t1 join has_allergy as t2 on t1.allergy = t2.allergy join student as t3 on t3.stuid = t2.stuid where t3.fname = \"Lisa\" order by t1.allergy"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat, Milk. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat, Milk. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Find the first name and gender of the student who has allergy to milk but not cat.", "output": "select fname, sex from student where stuid in (select stuid from has_allergy where allergy = \"Milk\" except select stuid from has_allergy where allergy = \"Cat\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Milk, Cat. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Milk, Cat. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the first name and gender of the students who have allergy to milk but can put up with cats?", "output": "select fname, sex from student where stuid in (select stuid from has_allergy where allergy = \"Milk\" except select stuid from has_allergy where allergy = \"Cat\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as animal, food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Find the average age of the students who have allergies with food and animal types.", "output": "select avg(age) from student where stuid in ( select t1.stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\" intersect select t1.stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"animal\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as animal, food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How old are the students with allergies to food and animal types on average?", "output": "select avg(age) from student where stuid in ( select t1.stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\" intersect select t1.stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"animal\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "List the first and last name of the students who do not have any food type allergy.", "output": "select fname, lname from student where stuid not in (select t1.stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What is the full name of each student who is not allergic to any type of food.", "output": "select fname, lname from student where stuid not in (select t1.stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Find the number of male (sex is 'M') students who have some food type allery.", "output": "select count(*) from student where sex = \"M\" and stuid in (select stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many male students (sex is 'M') are allergic to any type of food?", "output": "select count(*) from student where sex = \"M\" and stuid in (select stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat, Milk. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat, Milk. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Find the different first names and cities of the students who have allergy to milk or cat.", "output": "select distinct t1.fname, t1.city_code from student as t1 join has_allergy as t2 on t1.stuid = t2.stuid where t2.allergy = \"Milk\" or t2.allergy = \"Cat\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Cat, Milk. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Cat, Milk. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the distinct first names and cities of the students who have allergy either to milk or to cat?", "output": "select distinct t1.fname, t1.city_code from student as t1 join has_allergy as t2 on t1.stuid = t2.stuid where t2.allergy = \"Milk\" or t2.allergy = \"Cat\""}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as animal, food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Find the number of students who are older than 18 and do not have allergy to either food or animal.", "output": "select count(*) from student where age > 18 and stuid not in ( select stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\" or t2.allergytype = \"animal\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergytype contains values such as animal, food. Table has_allergy has columns such as stuid, allergy. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "How many students are over 18 and do not have allergy to food type or animal type?", "output": "select count(*) from student where age > 18 and stuid not in ( select stuid from has_allergy as t1 join allergy_type as t2 on t1.allergy = t2.allergy where t2.allergytype = \"food\" or t2.allergytype = \"animal\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Soy. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Soy. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "Find the first name and major of the students who are not allegry to soy.", "output": "select fname, major from student where stuid not in (select stuid from has_allergy where allergy = \"Soy\")"}, {"instruction": "allergy_1 contains tables such as allergy_type, has_allergy, student. Table allergy_type has columns such as allergy, allergytype. allergy is the primary key. The allergy contains values such as Soy. Table has_allergy has columns such as stuid, allergy. is the primary key. The allergy contains values such as Soy. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The allergy of has_allergy is the foreign key of allergy of allergy_type. The stuid of has_allergy is the foreign key of stuid of student.", "input": "What are the first name and major of the students who are able to consume soy?", "output": "select fname, major from student where stuid not in (select stuid from has_allergy where allergy = \"Soy\")"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "A list of the top 5 countries by number of invoices. List country name and number of invoices.", "output": "select billing_country, count(*) from invoices group by billing_country order by count(*) desc limit 5;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the top 5 countries by number of invoices and how many do they have?", "output": "select billing_country, count(*) from invoices group by billing_country order by count(*) desc limit 5;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "A list of the top 8 countries by gross/total invoice size. List country name and gross invoice size.", "output": "select billing_country, sum(total) from invoices group by billing_country order by sum(total) desc limit 8;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of the top 8 countries by total invoice size and what are those sizes?", "output": "select billing_country, sum(total) from invoices group by billing_country order by sum(total) desc limit 8;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "A list of the top 10 countries by average invoice size. List country name and average invoice size.", "output": "select billing_country, avg(total) from invoices group by billing_country order by avg(total) desc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of the countries and average invoice size of the top countries by size?", "output": "select billing_country, avg(total) from invoices group by billing_country order by avg(total) desc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Find out 5 customers who most recently purchased something. List customers' first and last name.", "output": "select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by t2.invoice_date desc limit 5;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the first and last names of the 5 customers who purchased something most recently?", "output": "select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by t2.invoice_date desc limit 5;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Find out the top 10 customers by total number of orders. List customers' first and last name and the number of total orders.", "output": "select t1.first_name, t1.last_name, count(*) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id order by count(*) desc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the top 10 customers' first and last names by total number of orders and how many orders did they make?", "output": "select t1.first_name, t1.last_name, count(*) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id order by count(*) desc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the top 10 customers by total gross sales. List customers' first and last name and total gross sales.", "output": "select t1.first_name, t1.last_name, sum(t2.total) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id order by sum(t2.total) desc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?", "output": "select t1.first_name, t1.last_name, sum(t2.total) from customers as t1 join invoices as t2 on t2.customer_id = t1.id group by t1.id order by sum(t2.total) desc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the top 5 genres by number of tracks. List genres name and total tracks.", "output": "select t1.name, count(*) from genres as t1 join tracks as t2 on t2.genre_id = t1.id group by t1.id order by count(*) desc limit 5;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many tracks does each genre have and what are the names of the top 5?", "output": "select t1.name, count(*) from genres as t1 join tracks as t2 on t2.genre_id = t1.id group by t1.id order by count(*) desc limit 5;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List every album's title.", "output": "select title from albums;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the titles of all the albums?", "output": "select title from albums;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List every album ordered by album title in ascending order.", "output": "select title from albums order by title;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the titles of all the albums alphabetically ascending?", "output": "select title from albums order by title;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List every album whose title starts with A in alphabetical order.", "output": "select title from albums where title like 'A%' order by title;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the titles of all albums that start with A in alphabetical order?", "output": "select title from albums where title like 'A%' order by title;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the customers first and last name of 10 least expensive invoices.", "output": "select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by total limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the first and last names of the customers with the 10 cheapest invoices?", "output": "select t1.first_name, t1.last_name from customers as t1 join invoices as t2 on t2.customer_id = t1.id order by total limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The city contains values such as Chicago.The state contains values such as IL. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_city contains values such as Chicago.The billing_state contains values such as IL. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List total amount of invoice from Chicago, IL.", "output": "select sum(total) from invoices where billing_city = \"Chicago\" and billing_state = \"IL\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The city contains values such as Chicago. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_city contains values such as Chicago. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Money. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the total amount of money in the invoices billed from Chicago, Illinois?", "output": "select sum(total) from invoices where billing_city = \"Chicago\" and billing_state = \"IL\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The city contains values such as Chicago.The state contains values such as IL. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_city contains values such as Chicago.The billing_state contains values such as IL. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the number of invoices from Chicago, IL.", "output": "select count(*) from invoices where billing_city = \"Chicago\" and billing_state = \"IL\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The city contains values such as Chicago. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_city contains values such as Chicago. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many invoices were billed from Chicago, IL?", "output": "select count(*) from invoices where billing_city = \"Chicago\" and billing_state = \"IL\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the number of invoices from the US, grouped by state.", "output": "select billing_state, count(*) from invoices where billing_country = \"USA\" group by billing_state;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many invoices were billed from each state?", "output": "select billing_state, count(*) from invoices where billing_country = \"USA\" group by billing_state;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the state in the US with the most invoices.", "output": "select billing_state, count(*) from invoices where billing_country = \"USA\" group by billing_state order by count(*) desc limit 1;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the states with the most invoices?", "output": "select billing_state, count(*) from invoices where billing_country = \"USA\" group by billing_state order by count(*) desc limit 1;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the number of invoices and the invoice total from California.", "output": "select billing_state, count(*), sum(total) from invoices where billing_state = \"CA\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The state contains values such as CA. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_state contains values such as CA. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Money. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the number of invoices and total money billed in them from CA?", "output": "select billing_state, count(*), sum(total) from invoices where billing_state = \"CA\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. The name contains values such as Aerosmith. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List Aerosmith's albums.", "output": "select t1.title from albums as t1 join artists as t2 on t1.artist_id = t2.id where t2.name = \"Aerosmith\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. The name contains values such as Aerosmith. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the titles of all the Aerosmith albums?", "output": "select t1.title from albums as t1 join artists as t2 on t1.artist_id = t2.id where t2.name = \"Aerosmith\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. The name contains values such as Billy Cobham. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The composer contains values such as Billy Cobham. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many albums does Billy Cobham has?", "output": "select count(*) from albums as t1 join artists as t2 on t1.artist_id = t2.id where t2.name = \"Billy Cobham\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The composer contains values such as Billy Cobham. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many albums has Billy Cobam released?", "output": "select count(*) from albums as t1 join artists as t2 on t1.artist_id = t2.id where t2.name = \"Billy Cobham\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Eduardo.The last_name contains values such as Martins. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Eduardo Martins is a customer at which company?", "output": "select company from customers where first_name = \"Eduardo\" and last_name = \"Martins\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Eduardo.The last_name contains values such as Martins. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the company where Eduardo Martins is a customer?", "output": "select company from customers where first_name = \"Eduardo\" and last_name = \"Martins\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Astrid.The last_name contains values such as Gruber. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is Astrid Gruber's email and phone number?", "output": "select email, phone from customers where first_name = \"Astrid\" and last_name = \"Gruber\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Astrid.The last_name contains values such as Gruber. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the email and phone number of Astrid Gruber the customer?", "output": "select email, phone from customers where first_name = \"Astrid\" and last_name = \"Gruber\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The city contains values such as Prague. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_city contains values such as Prague. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many customers live in Prague city?", "output": "select count(*) from customers where city = \"Prague\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The city contains values such as Prague. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_city contains values such as Prague. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many customers live in the city of Prague?", "output": "select count(*) from customers where city = \"Prague\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The state contains values such as CA. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_state contains values such as CA. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many customers in state of CA?", "output": "select count(*) from customers where state = \"CA\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many customers are from California?", "output": "select count(*) from customers where state = \"CA\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Roberto.The last_name contains values such as Almeida. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What country does Roberto Almeida live?", "output": "select country from customers where first_name = \"Roberto\" and last_name = \"Almeida\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Roberto.The last_name contains values such as Almeida. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "In which country does Roberto Almeida?", "output": "select country from customers where first_name = \"Roberto\" and last_name = \"Almeida\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the name of albums that are released by aritist whose name has 'Led'", "output": "select t2.title from artists as t1 join albums as t2 on t1.id = t2.artist_id where t1.name like '%led%'"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the title of the album that was released by the artist whose name has the phrase 'Led'?", "output": "select t2.title from artists as t1 join albums as t2 on t1.id = t2.artist_id where t1.name like '%led%'"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Johnson.The first_name contains values such as Steve. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Steve. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many customers does Steve Johnson support?", "output": "select count(*) from employees as t1 join customers as t2 on t2.support_rep_id = t1.id where t1.first_name = \"Steve\" and t1.last_name = \"Johnson\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Johnson.The first_name contains values such as Steve. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Steve. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the count of customers that Steve Johnson supports?", "output": "select count(*) from employees as t1 join customers as t2 on t2.support_rep_id = t1.id where t1.first_name = \"Steve\" and t1.last_name = \"Johnson\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the title, phone and hire date of Nancy Edwards?", "output": "select title, phone, hire_date from employees where first_name = \"Nancy\" and last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the title, phone number and hire date for the employee named Nancy Edwards?", "output": "select title, phone, hire_date from employees where first_name = \"Nancy\" and last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "find the full name of employees who report to Nancy Edwards?", "output": "select t2.first_name, t2.last_name from employees as t1 join employees as t2 on t1.id = t2.reports_to where t1.first_name = \"Nancy\" and t1.last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the first and last name of the employee who reports to Nancy Edwards?", "output": "select t2.first_name, t2.last_name from employees as t1 join employees as t2 on t1.id = t2.reports_to where t1.first_name = \"Nancy\" and t1.last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the address of employee Nancy Edwards?", "output": "select address from employees where first_name = \"Nancy\" and last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is Nancy Edwards's address?", "output": "select address from employees where first_name = \"Nancy\" and last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Find the full name of employee who supported the most number of customers.", "output": "select t1.first_name, t1.last_name from employees as t1 join customers as t2 on t1.id = t2.support_rep_id group by t1.id order by count(*) desc limit 1"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the full name of the employee who has the most customers?", "output": "select t1.first_name, t1.last_name from employees as t1 join customers as t2 on t1.id = t2.support_rep_id group by t1.id order by count(*) desc limit 1"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The country contains values such as Canada. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The country contains values such as Canada. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_country contains values such as Canada. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many employees are living in Canada?", "output": "select count(*) from employees where country = \"Canada\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The country contains values such as Canada. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The country contains values such as Canada. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. The billing_country contains values such as Canada. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many employees live in Canada?", "output": "select count(*) from employees where country = \"Canada\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is employee Nancy Edwards's phone number?", "output": "select phone from employees where first_name = \"Nancy\" and last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The last_name contains values such as Edwards.The first_name contains values such as Nancy. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the the phone number of Nancy Edwards?", "output": "select phone from employees where first_name = \"Nancy\" and last_name = \"Edwards\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Who is the youngest employee in the company? List employee's first and last name.", "output": "select first_name, last_name from employees order by birth_date desc limit 1;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What si the youngest employee's first and last name?", "output": "select first_name, last_name from employees order by birth_date desc limit 1;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List top 10 employee work longest in the company. List employee's first and last name.", "output": "select first_name, last_name from employees order by hire_date asc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the first and last names of the top 10 longest-serving employees?", "output": "select first_name, last_name from employees order by hire_date asc limit 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The title contains values such as IT Staff. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Find the number of employees whose title is IT Staff from each city?", "output": "select count(*), city from employees where title = 'IT Staff' group by city"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. The title contains values such as IT Staff. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many employees who are IT staff are from each city?", "output": "select count(*), city from employees where title = 'IT Staff' group by city"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Which employee manage most number of peoples? List employee's first and last name, and number of people report to that employee.", "output": "select t2.first_name, t2.last_name, count(t1.reports_to) from employees as t1 join employees as t2 on t1.reports_to = t2.id group by t1.reports_to order by count(t1.reports_to) desc limit 1;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the first and last names of all the employees and how many people report to them?", "output": "select t2.first_name, t2.last_name, count(t1.reports_to) from employees as t1 join employees as t2 on t1.reports_to = t2.id group by t1.reports_to order by count(t1.reports_to) desc limit 1;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Lucas.The last_name contains values such as Mancini. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many orders does Lucas Mancini has?", "output": "select count(*) from customers as t1 join invoices as t2 on t1.id = t2.customer_id where t1.first_name = \"Lucas\" and t1.last_name = \"Mancini\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The last_name contains values such as Mancini. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many orders does Luca Mancini have in his invoices?", "output": "select count(*) from customers as t1 join invoices as t2 on t1.id = t2.customer_id where t1.first_name = \"Lucas\" and t1.last_name = \"Mancini\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Lucas.The last_name contains values such as Mancini. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Money. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the total amount of money spent by Lucas Mancini?", "output": "select sum(t2.total) from customers as t1 join invoices as t2 on t1.id = t2.customer_id where t1.first_name = \"Lucas\" and t1.last_name = \"Mancini\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Lucas.The last_name contains values such as Mancini. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Money. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How much money did Lucas Mancini spend?", "output": "select sum(t2.total) from customers as t1 join invoices as t2 on t1.id = t2.customer_id where t1.first_name = \"Lucas\" and t1.last_name = \"Mancini\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List all media types.", "output": "select name from media_types;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all the media types?", "output": "select name from media_types;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List all different genre types.", "output": "select distinct name from genres;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the different names of the genres?", "output": "select distinct name from genres;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the name of all playlist.", "output": "select name from playlists;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all the playlists?", "output": "select name from playlists;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Fast As a Shark. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Who is the composer of track Fast As a Shark?", "output": "select composer from tracks where name = \"Fast as a Shark\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Fast As a Shark. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the composer who created the track \"Fast As a Shark\"?", "output": "select composer from tracks where name = \"Fast as a Shark\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Fast As a Shark. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How long does track Fast As a Shark has?", "output": "select milliseconds from tracks where name = \"Fast as a Shark\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Fast As a Shark. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many milliseconds long is Fast As a Shark?", "output": "select milliseconds from tracks where name = \"Fast as a Shark\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the name of tracks whose genre is Rock?", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id where t1.name = \"Rock\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the name of all tracks in the Rock genre?", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id where t1.name = \"Rock\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. The title contains values such as Balls to the Wall. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Balls to the Wall. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is title of album which track Balls to the Wall belongs to?", "output": "select t1.title from albums as t1 join tracks as t2 on t1.id = t2.genre_id where t2.name = \"Balls to the Wall\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the name of the album that has the track Ball to the Wall?", "output": "select t1.title from albums as t1 join tracks as t2 on t1.id = t2.genre_id where t2.name = \"Balls to the Wall\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. The title contains values such as Balls to the Wall. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Balls to the Wall. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List name of all tracks in Balls to the Wall.", "output": "select t2.name from albums as t1 join tracks as t2 on t1.id = t2.genre_id where t1.title = \"Balls to the Wall\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. The title contains values such as Balls to the Wall. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Balls to the Wall. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the name of all tracks in the album named Balls to the Wall?", "output": "select t2.name from albums as t1 join tracks as t2 on t1.id = t2.genre_id where t1.title = \"Balls to the Wall\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List title of albums have the number of tracks greater than 10.", "output": "select t1.title from albums as t1 join tracks as t2 on t1.id = t2.album_id group by t1.id having count(t1.id) > 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of the albums that have more than 10 tracks?", "output": "select t1.title from albums as t1 join tracks as t2 on t1.id = t2.album_id group by t1.id having count(t1.id) > 10;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. The name contains values such as MPEG audio file. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the name of tracks belongs to genre Rock and whose media type is MPEG audio file.", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id join media_types as t3 on t3.id = t2.media_type_id where t1.name = \"Rock\" and t3.name = \"MPEG audio file\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all Rock tracks that are stored on MPEG audio files?", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id join media_types as t3 on t3.id = t2.media_type_id where t1.name = \"Rock\" and t3.name = \"MPEG audio file\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. The name contains values such as MPEG audio file. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the name of tracks belongs to genre Rock or media type is MPEG audio file.", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id join media_types as t3 on t3.id = t2.media_type_id where t1.name = \"Rock\" or t3.name = \"MPEG audio file\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Belong. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id join media_types as t3 on t3.id = t2.media_type_id where t1.name = \"Rock\" or t3.name = \"MPEG audio file\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock, Jazz. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the name of tracks belongs to genre Rock or genre Jazz.", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id where t1.name = \"Rock\" or t1.name = \"Jazz\""}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. The name contains values such as Rock, Jazz. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of the tracks that are Rock or Jazz songs?", "output": "select t2.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id where t1.name = \"Rock\" or t1.name = \"Jazz\""}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. The name contains values such as Movies. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the name of all tracks in the playlists of Movies.", "output": "select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t3.id = t2.playlist_id where t3.name = \"Movies\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. The name contains values such as Movies. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all tracks that are on playlists titled Movies?", "output": "select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t3.id = t2.playlist_id where t3.name = \"Movies\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List the name of playlist which has number of tracks greater than 100.", "output": "select t2.name from playlist_tracks as t1 join playlists as t2 on t2.id = t1.playlist_id group by t1.playlist_id having count(t1.track_id) > 100;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all playlists that have more than 100 tracks?", "output": "select t2.name from playlist_tracks as t1 join playlists as t2 on t2.id = t1.playlist_id group by t1.playlist_id having count(t1.track_id) > 100;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The first_name contains values such as Daan.The last_name contains values such as Peeters. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "List all tracks bought by customer Daan Peeters.", "output": "select t1.name from tracks as t1 join invoice_lines as t2 on t1.id = t2.track_id join invoices as t3 on t3.id = t2.invoice_id join customers as t4 on t4.id = t3.customer_id where t4.first_name = \"Daan\" and t4.last_name = \"Peeters\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. The last_name contains values such as Peeters. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the tracks that Dean Peeters bought?", "output": "select t1.name from tracks as t1 join invoice_lines as t2 on t1.id = t2.track_id join invoices as t3 on t3.id = t2.invoice_id join customers as t4 on t4.id = t3.customer_id where t4.first_name = \"Daan\" and t4.last_name = \"Peeters\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Fast As a Shark. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How much is the track Fast As a Shark?", "output": "select unit_price from tracks where name = \"Fast as a Shark\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. The name contains values such as Fast As a Shark. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What is the unit price of the tune \"Fast As a Shark\"?", "output": "select unit_price from tracks where name = \"Fast as a Shark\";"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. The name contains values such as Movies, Music. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Find the name of tracks which are in Movies playlist but not in music playlist.", "output": "select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Movies' except select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Music'"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. The name contains values such as Movies, Music. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all tracks that are on the Movies playlist but not in the music playlist?", "output": "select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Movies' except select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Music'"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. The name contains values such as Movies, Music. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Find the name of tracks which are in both Movies and music playlists.", "output": "select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Movies' intersect select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Music'"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. The name contains values such as Movies, Music. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "What are the names of all the tracks that are in both the Movies and music playlists?", "output": "select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Movies' intersect select t1.name from tracks as t1 join playlist_tracks as t2 on t1.id = t2.track_id join playlists as t3 on t2.playlist_id = t3.id where t3.name = 'Music'"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "Find number of tracks in each genre?", "output": "select count(*), t1.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id group by t1.name;"}, {"instruction": "store_1 contains tables such as artists, sqlite_sequence, albums, employees, customers, genres, invoices, media_types, tracks, invoice_lines, playlists, playlist_tracks. Table artists has columns such as id, name. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table albums has columns such as id, title, artist_id. id is the primary key. Table employees has columns such as id, last_name, first_name, title, reports_to, birth_date, hire_date, address, city, state, country, postal_code, phone, fax, email. id is the primary key. Table customers has columns such as id, first_name, last_name, company, address, city, state, country, postal_code, phone, fax, email, support_rep_id. id is the primary key. Table genres has columns such as id, name. id is the primary key. Table invoices has columns such as id, customer_id, invoice_date, billing_address, billing_city, billing_state, billing_country, billing_postal_code, total. id is the primary key. Table media_types has columns such as id, name. id is the primary key. Table tracks has columns such as id, name, album_id, media_type_id, genre_id, composer, milliseconds, bytes, unit_price. id is the primary key. Table invoice_lines has columns such as id, invoice_id, track_id, unit_price, quantity. id is the primary key. Table playlists has columns such as id, name. id is the primary key. Table playlist_tracks has columns such as playlist_id, track_id. playlist_id is the primary key. The artist_id of albums is the foreign key of id of artists. The reports_to of employees is the foreign key of id of employees. The support_rep_id of customers is the foreign key of id of employees. The customer_id of invoices is the foreign key of id of customers. The media_type_id of tracks is the foreign key of id of media_types. The genre_id of tracks is the foreign key of id of genres. The album_id of tracks is the foreign key of id of albums. The track_id of invoice_lines is the foreign key of id of tracks. The invoice_id of invoice_lines is the foreign key of id of invoices. The track_id of playlist_tracks is the foreign key of id of tracks. The playlist_id of playlist_tracks is the foreign key of id of playlists.", "input": "How many tracks are in each genre?", "output": "select count(*), t1.name from genres as t1 join tracks as t2 on t1.id = t2.genre_id group by t1.name;"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "How many editors are there?", "output": "select count(*) from editor"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "List the names of editors in ascending order of age.", "output": "select name from editor order by age asc"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "What are the names and ages of editors?", "output": "select name, age from editor"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "List the names of editors who are older than 25.", "output": "select name from editor where age > 25"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Show the names of editors of age either 24 or 25.", "output": "select name from editor where age = 24 or age = 25"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "What is the name of the youngest editor?", "output": "select name from editor order by age asc limit 1"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "What are the different ages of editors? Show each age along with the number of editors of that age.", "output": "select age, count(*) from editor group by age"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Please show the most common age of editors.", "output": "select age from editor group by age order by count(*) desc limit 1"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Show the distinct themes of journals.", "output": "select distinct theme from journal"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Show the names of editors and the theme of journals for which they serve on committees.", "output": "select t2.name, t3.theme from journal_committee as t1 join editor as t2 on t1.editor_id = t2.editor_id join journal as t3 on t1.journal_id = t3.journal_id"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "For each journal_committee, find the editor name and the journal theme.", "output": "select t2.name, t3.theme from journal_committee as t1 join editor as t2 on t1.editor_id = t2.editor_id join journal as t3 on t1.journal_id = t3.journal_id"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.", "output": "select t2.name, t2.age, t3.theme from journal_committee as t1 join editor as t2 on t1.editor_id = t2.editor_id join journal as t3 on t1.journal_id = t3.journal_id order by t3.theme asc"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Show the names of editors that are on the committee of journals with sales bigger than 3000.", "output": "select t2.name from journal_committee as t1 join editor as t2 on t1.editor_id = t2.editor_id join journal as t3 on t1.journal_id = t3.journal_id where t3.sales > 3000"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Show the id, name of each editor and the number of journal committees they are on.", "output": "select t1.editor_id, t1.name, count(*) from editor as t1 join journal_committee as t2 on t1.editor_id = t2.editor_id group by t1.editor_id"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "Show the names of editors that are on at least two journal committees.", "output": "select t1.name from editor as t1 join journal_committee as t2 on t1.editor_id = t2.editor_id group by t1.name having count(*) >= 2"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "List the names of editors that are not on any journal committee.", "output": "select name from editor where editor_id not in (select editor_id from journal_committee)"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "List the date, theme and sales of the journal which did not have any of the listed editors serving on committee.", "output": "select date, theme, sales from journal except select t1.date, t1.theme, t1.sales from journal as t1 join journal_committee as t2 on t1.journal_id = t2.journal_id"}, {"instruction": "journal_committee contains tables such as journal, editor, journal_committee. Table journal has columns such as journal_id, date, theme, sales. journal_id is the primary key. Table editor has columns such as editor_id, name, age. editor_id is the primary key. Table journal_committee has columns such as editor_id, journal_id, work_type. editor_id is the primary key. The work_type contains values such as Photo. The journal_id of journal_committee is the foreign key of journal_id of journal. The editor_id of journal_committee is the foreign key of editor_id of editor.", "input": "What is the average sales of the journals that have an editor whose work type is 'Photo'?", "output": "select avg(t1.sales) from journal as t1 join journal_committee as t2 on t1.journal_id = t2.journal_id where t2.work_type = 'Photo'"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many accounts do we have?", "output": "select count(*) from accounts"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Count the number of accounts.", "output": "select count(*) from accounts"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show ids, customer ids, names for all accounts.", "output": "select account_id, customer_id, account_name from accounts"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the account ids, customer ids, and account names for all the accounts?", "output": "select account_id, customer_id, account_name from accounts"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show other account details for account with name 338.", "output": "select other_account_details from accounts where account_name = \"338\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the other account details for the account with the name 338?", "output": "select other_account_details from accounts where account_name = \"338\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the first name, last name, and phone of the customer with account name 162?", "output": "select t2.customer_first_name, t2.customer_last_name, t2.customer_phone from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.account_name = \"162\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Give the full name and phone of the customer who has the account name 162.", "output": "select t2.customer_first_name, t2.customer_last_name, t2.customer_phone from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.account_name = \"162\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Art.The customer_last_name contains values such as Turcotte. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many accounts does the customer with first name Art and last name Turcotte have?", "output": "select count(*) from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Art\" and t2.customer_last_name = \"Turcotte\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Art.The customer_last_name contains values such as Turcotte. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the number of accounts that the customer with the first name Art and last name Turcotte has.", "output": "select count(*) from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Art\" and t2.customer_last_name = \"Turcotte\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show all customer ids and the number of accounts for each customer.", "output": "select customer_id, count(*) from accounts group by customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many accounts are there for each customer id?", "output": "select customer_id, count(*) from accounts group by customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the customer id and number of accounts with most accounts.", "output": "select customer_id, count(*) from accounts group by customer_id order by count(*) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the customer id of the customer with the most accounts, and how many accounts does this person have?", "output": "select customer_id, count(*) from accounts group by customer_id order by count(*) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the customer first, last name and id with least number of accounts.", "output": "select t2.customer_first_name, t2.customer_last_name, t1.customer_id from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) asc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Give the full name and customer id of the customer with the fewest accounts.", "output": "select t2.customer_first_name, t2.customer_last_name, t1.customer_id from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) asc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the number of all customers without an account.", "output": "select count(*) from customers where customer_id not in (select customer_id from accounts)"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many customers do not have an account?", "output": "select count(*) from customers where customer_id not in (select customer_id from accounts)"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the first names and last names of customers without any account.", "output": "select customer_first_name, customer_last_name from customers except select t1.customer_first_name, t1.customer_last_name from customers as t1 join accounts as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the full names of customers who do not have any accounts?", "output": "select customer_first_name, customer_last_name from customers except select t1.customer_first_name, t1.customer_last_name from customers as t1 join accounts as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show distinct first and last names for all customers with an account.", "output": "select distinct t1.customer_first_name, t1.customer_last_name from customers as t1 join accounts as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the full names of customers who have accounts?", "output": "select distinct t1.customer_first_name, t1.customer_last_name from customers as t1 join accounts as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many customers have an account?", "output": "select count(distinct customer_id) from accounts"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Count the number of customers who hold an account.", "output": "select count(distinct customer_id) from accounts"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many customers do we have?", "output": "select count(*) from customers"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Count the number of customers.", "output": "select count(*) from customers"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show ids, first names, last names, and phones for all customers.", "output": "select customer_id, customer_first_name, customer_last_name, customer_phone from customers"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the ids, full names, and phones of each customer?", "output": "select customer_id, customer_first_name, customer_last_name, customer_phone from customers"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Aniyah.The customer_last_name contains values such as Feest. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the phone and email for customer with first name Aniyah and last name Feest?", "output": "select customer_phone, customer_email from customers where customer_first_name = \"Aniyah\" and customer_last_name = \"Feest\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Aniyah.The customer_last_name contains values such as Feest. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the phone and email of the customer with the first name Aniyah and last name Feest.", "output": "select customer_phone, customer_email from customers where customer_first_name = \"Aniyah\" and customer_last_name = \"Feest\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the number of customer cards.", "output": "select count(*) from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many customer cards are there?", "output": "select count(*) from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show ids, customer ids, card type codes, card numbers for all cards.", "output": "select card_id, customer_id, card_type_code, card_number from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are card ids, customer ids, card types, and card numbers for each customer card?", "output": "select card_id, customer_id, card_type_code, card_number from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the date valid from and the date valid to for the card with card number '4560596484842'.", "output": "select date_valid_from, date_valid_to from customers_cards where card_number = \"4560596484842\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the valid from and valid to dates for the card with the number 4560596484842?", "output": "select date_valid_from, date_valid_to from customers_cards where card_number = \"4560596484842\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the first name, last name, and phone of the customer with card 4560596484842.", "output": "select t2.customer_first_name, t2.customer_last_name, t2.customer_phone from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.card_number = \"4560596484842\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the full name and phone of the customer who has card number 4560596484842.", "output": "select t2.customer_first_name, t2.customer_last_name, t2.customer_phone from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.card_number = \"4560596484842\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Art.The customer_last_name contains values such as Turcotte. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many cards does customer Art Turcotte have?", "output": "select count(*) from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Art\" and t2.customer_last_name = \"Turcotte\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Art.The customer_last_name contains values such as Turcotte. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Count the number of cards the customer with the first name Art and last name Turcotte has.", "output": "select count(*) from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Art\" and t2.customer_last_name = \"Turcotte\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. The card_type_code contains values such as Debit. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many debit cards do we have?", "output": "select count(*) from customers_cards where card_type_code = \"Debit\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. The card_type_code contains values such as Debit. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Count the number of customer cards of the type Debit.", "output": "select count(*) from customers_cards where card_type_code = \"Debit\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Blanche.The customer_last_name contains values such as Huels. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. The card_type_code contains values such as Credit. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many credit cards does customer Blanche Huels have?", "output": "select count(*) from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Blanche\" and t2.customer_last_name = \"Huels\" and t1.card_type_code = \"Credit\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. The customer_first_name contains values such as Blanche.The customer_last_name contains values such as Huels. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. The card_type_code contains values such as Credit. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Count the number of credit cards that the customer with first name Blanche and last name Huels has.", "output": "select count(*) from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Blanche\" and t2.customer_last_name = \"Huels\" and t1.card_type_code = \"Credit\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show all customer ids and the number of cards owned by each customer.", "output": "select customer_id, count(*) from customers_cards group by customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different customer ids, and how many cards does each one hold?", "output": "select customer_id, count(*) from customers_cards group by customer_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the customer id with most number of cards, and how many does he have?", "output": "select customer_id, count(*) from customers_cards group by customer_id order by count(*) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the id of the customer who has the most cards, as well as the number of cards.", "output": "select customer_id, count(*) from customers_cards group by customer_id order by count(*) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show id, first and last names for all customers with at least two cards.", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) >= 2"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the ids and full names of customers who hold two or more cards?", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) >= 2"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the customer id, first and last name with least number of accounts.", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) asc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the id and full name of the customer who has the fewest accounts.", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) asc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show all card type codes and the number of cards in each type.", "output": "select card_type_code, count(*) from customers_cards group by card_type_code"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different card types, and how many cards are there of each?", "output": "select card_type_code, count(*) from customers_cards group by card_type_code"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the card type code with most number of cards?", "output": "select card_type_code from customers_cards group by card_type_code order by count(*) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the code of the card type that is most common.", "output": "select card_type_code from customers_cards group by card_type_code order by count(*) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show card type codes with at least 5 cards.", "output": "select card_type_code from customers_cards group by card_type_code having count(*) >= 5"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the codes of card types that have 5 or more cards?", "output": "select card_type_code from customers_cards group by card_type_code having count(*) >= 5"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show all card type codes and the number of customers holding cards in each type.", "output": "select card_type_code, count(distinct customer_id) from customers_cards group by card_type_code"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different card type codes, and how many different customers hold each type?", "output": "select card_type_code, count(distinct customer_id) from customers_cards group by card_type_code"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. The card_type_code contains values such as Credit. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the customer ids and firstname without a credit card.", "output": "select customer_id, customer_first_name from customers except select t1.customer_id, t2.customer_first_name from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where card_type_code = \"Credit\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. The card_type_code contains values such as Credit. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the ids and first names of customers who do not hold a credit card?", "output": "select customer_id, customer_first_name from customers except select t1.customer_id, t2.customer_first_name from customers_cards as t1 join customers as t2 on t1.customer_id = t2.customer_id where card_type_code = \"Credit\""}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show all card type codes.", "output": "select distinct card_type_code from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different card type codes?", "output": "select distinct card_type_code from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the number of card types.", "output": "select count(distinct card_type_code) from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many different card types are there?", "output": "select count(distinct card_type_code) from customers_cards"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show all transaction types.", "output": "select distinct transaction_type from financial_transactions"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different types of transactions?", "output": "select distinct transaction_type from financial_transactions"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the number of transaction types.", "output": "select count(distinct transaction_type) from financial_transactions"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "How many different types of transactions are there?", "output": "select count(distinct transaction_type) from financial_transactions"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the average and total transaction amount?", "output": "select avg(transaction_amount), sum(transaction_amount) from financial_transactions"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the average transaction amount, as well as the total amount of all transactions.", "output": "select avg(transaction_amount), sum(transaction_amount) from financial_transactions"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the card type codes and the number of transactions.", "output": "select t2.card_type_code, count(*) from financial_transactions as t1 join customers_cards as t2 on t1.card_id = t2.card_id group by t2.card_type_code"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different card types, and how many transactions have been made with each?", "output": "select t2.card_type_code, count(*) from financial_transactions as t1 join customers_cards as t2 on t1.card_id = t2.card_id group by t2.card_type_code"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the transaction type and the number of transactions.", "output": "select transaction_type, count(*) from financial_transactions group by transaction_type"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different transaction types, and how many transactions of each have taken place?", "output": "select transaction_type, count(*) from financial_transactions group by transaction_type"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What is the transaction type that has processed the greatest total amount in transactions?", "output": "select transaction_type from financial_transactions group by transaction_type order by sum(transaction_amount) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Return the type of transaction with the highest total amount.", "output": "select transaction_type from financial_transactions group by transaction_type order by sum(transaction_amount) desc limit 1"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "Show the account id and the number of transactions for each account", "output": "select account_id, count(*) from financial_transactions group by account_id"}, {"instruction": "customers_card_transactions contains tables such as accounts, customers, customers_cards, financial_transactions. Table accounts has columns such as account_id, customer_id, account_name, other_account_details. account_id is the primary key. Table customers has columns such as customer_id, customer_first_name, customer_last_name, customer_address, customer_phone, customer_email, other_customer_details. customer_id is the primary key. Table customers_cards has columns such as card_id, customer_id, card_type_code, card_number, date_valid_from, date_valid_to, other_card_details. card_id is the primary key. Table financial_transactions has columns such as transaction_id, previous_transaction_id, account_id, card_id, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. The account_id of financial_transactions is the foreign key of account_id of accounts. The card_id of financial_transactions is the foreign key of card_id of customers_cards.", "input": "What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?", "output": "select account_id, count(*) from financial_transactions group by account_id"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "How many tracks do we have?", "output": "select count(*) from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Count the number of tracks.", "output": "select count(*) from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show the name and location for all tracks.", "output": "select name, location from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names and locations of all tracks?", "output": "select name, location from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show names and seatings, ordered by seating for all tracks opened after 2000.", "output": "select name, seating from track where year_opened > 2000 order by seating"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names and seatings for all tracks opened after 2000, ordered by seating?", "output": "select name, seating from track where year_opened > 2000 order by seating"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What is the name, location and seating for the most recently opened track?", "output": "select name, location, seating from track order by year_opened desc limit 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Return the name, location, and seating of the track that was opened in the most recent year.", "output": "select name, location, seating from track order by year_opened desc limit 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What is the minimum, maximum, and average seating for all tracks.", "output": "select min(seating), max(seating), avg(seating) from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Return the minimum, maximum, and average seating across all tracks.", "output": "select min(seating), max(seating), avg(seating) from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show the name, location, open year for all tracks with a seating higher than the average.", "output": "select name, location, year_opened from track where seating > (select avg(seating) from track)"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names, locations, and years of opening for tracks with seating higher than average?", "output": "select name, location, year_opened from track where seating > (select avg(seating) from track)"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are distinct locations where tracks are located?", "output": "select distinct location from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Give the different locations of tracks.", "output": "select distinct location from track"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "How many races are there?", "output": "select count(*) from race"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Count the number of races.", "output": "select count(*) from race"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the distinct classes that races can have?", "output": "select distinct class from race"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Return the different classes of races.", "output": "select distinct class from race"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show name, class, and date for all races.", "output": "select name, class, date from race"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names, classes, and dates for all races?", "output": "select name, class, date from race"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show the race class and number of races in each class.", "output": "select class, count(*) from race group by class"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the different classes of races, and how many races correspond to each?", "output": "select class, count(*) from race group by class"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What is the race class with most number of races.", "output": "select class from race group by class order by count(*) desc limit 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Give the class of races that is most common.", "output": "select class from race group by class order by count(*) desc limit 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "List the race class with at least two races.", "output": "select class from race group by class having count(*) >= 2"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the classes of races that have two or more corresponding races?", "output": "select class from race group by class having count(*) >= 2"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. The class contains values such as GT. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names for tracks without a race in class 'GT'.", "output": "select name from track except select t2.name from race as t1 join track as t2 on t1.track_id = t2.track_id where t1.class = 'GT'"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. The class contains values such as GT. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Give the names of tracks that do not have a race in the class 'GT'.", "output": "select name from track except select t2.name from race as t1 join track as t2 on t1.track_id = t2.track_id where t1.class = 'GT'"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show all track names that have had no races.", "output": "select name from track where track_id not in (select track_id from race)"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Return the names of tracks that have no had any races.", "output": "select name from track where track_id not in (select track_id from race)"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.", "output": "select year_opened from track where seating between 4000 and 5000"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the years of opening for tracks with seating between 4000 and 5000?", "output": "select year_opened from track where seating between 4000 and 5000"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show the name of track and the number of races in each track.", "output": "select t2.name, count(*) from race as t1 join track as t2 on t1.track_id = t2.track_id group by t1.track_id"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names of different tracks, and how many races has each had?", "output": "select t2.name, count(*) from race as t1 join track as t2 on t1.track_id = t2.track_id group by t1.track_id"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show the name of track with most number of races.", "output": "select t2.name from race as t1 join track as t2 on t1.track_id = t2.track_id group by t1.track_id order by count(*) desc limit 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What is the name of the track that has had the greatest number of races?", "output": "select t2.name from race as t1 join track as t2 on t1.track_id = t2.track_id group by t1.track_id order by count(*) desc limit 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show the name and date for each race and its track name.", "output": "select t1.name, t1.date, t2.name from race as t1 join track as t2 on t1.track_id = t2.track_id"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names and dates of races, and the names of the tracks where they are held?", "output": "select t1.name, t1.date, t2.name from race as t1 join track as t2 on t1.track_id = t2.track_id"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Show the name and location of track with 1 race.", "output": "select t2.name, t2.location from race as t1 join track as t2 on t1.track_id = t2.track_id group by t1.track_id having count(*) = 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the names and locations of tracks that have had exactly 1 race?", "output": "select t2.name, t2.location from race as t1 join track as t2 on t1.track_id = t2.track_id group by t1.track_id having count(*) = 1"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.", "output": "select location from track where seating > 90000 intersect select location from track where seating < 70000"}, {"instruction": "race_track contains tables such as race, track. Table race has columns such as race_id, name, class, date, track_id. race_id is the primary key. Table track has columns such as track_id, name, location, seating, year_opened. track_id is the primary key. The track_id of race is the foreign key of track_id of track.", "input": "What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?", "output": "select location from track where seating > 90000 intersect select location from track where seating < 70000"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. The membership_card contains values such as Black. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "How many members have the black membership card?", "output": "select count(*) from member where membership_card = 'Black'"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Find the number of members living in each address.", "output": "select count(*), address from member group by address"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. The address contains values such as Waterbury. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Give me the names of members whose address is in Harford or Waterbury.", "output": "select name from member where address = 'Harford' or address = 'Waterbury'"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. The membership_card contains values such as Black. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Find the ids and names of members who are under age 30 or with black membership card.", "output": "select name, member_id from member where membership_card = 'Black' or age < 30"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Find the purchase time, age and address of each member, and show the results in the order of purchase time.", "output": "select time_of_purchase, age, address from member order by time_of_purchase"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Which membership card has more than 5 members?", "output": "select membership_card from member group by membership_card having count(*) > 5"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Which address has both members younger than 30 and members older than 40?", "output": "select address from member where age < 30 intersect select address from member where age > 40"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. The address contains values such as Hartford, Waterbury. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "What is the membership card held by both members living in Hartford and ones living in Waterbury address?", "output": "select membership_card from member where address = 'Hartford' intersect select membership_card from member where address = 'Waterbury'"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. The address contains values such as Hartford. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "How many members are not living in Hartford?", "output": "select count(*) from member where address != 'Hartford'"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. The membership_card contains values such as Black. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Which address do not have any member with the black membership card?", "output": "select address from member except select address from member where membership_card = 'Black'"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Show the shop addresses ordered by their opening year.", "output": "select address from shop order by open_year"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "What are the average score and average staff number of all shops?", "output": "select avg(num_of_staff), avg(score) from shop"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Find the id and address of the shops whose score is below the average score.", "output": "select shop_id, address from shop where score < (select avg(score) from shop)"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Find the address and staff number of the shops that do not have any happy hour.", "output": "select address, num_of_staff from shop where shop_id not in (select shop_id from happy_hour)"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. The month contains values such as May. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "What are the id and address of the shops which have a happy hour in May?", "output": "select t1.address, t1.shop_id from shop as t1 join happy_hour as t2 on t1.shop_id = t2.shop_id where month = 'May'"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "which shop has happy hour most frequently? List its id and number of happy hours.", "output": "select shop_id, count(*) from happy_hour group by shop_id order by count(*) desc limit 1"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Which month has the most happy hours?", "output": "select month from happy_hour group by month order by count(*) desc limit 1"}, {"instruction": "coffee_shop contains tables such as shop, member, happy_hour, happy_hour_member. Table shop has columns such as shop_id, address, num_of_staff, score, open_year. shop_id is the primary key. Table member has columns such as member_id, name, membership_card, age, time_of_purchase, level_of_membership, address. member_id is the primary key. Table happy_hour has columns such as hh_id, shop_id, month, num_of_shaff_in_charge. hh_id is the primary key. Table happy_hour_member has columns such as hh_id, member_id, total_amount. hh_id is the primary key. The shop_id of happy_hour is the foreign key of shop_id of shop. The member_id of happy_hour_member is the foreign key of member_id of member.", "input": "Which months have more than 2 happy hours?", "output": "select month from happy_hour group by month having count(*) > 2"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "How many albums are there?", "output": "select count(*) from album"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the number of albums.", "output": "select count(*) from album"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. The name contains values such as Music. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "List the names of all music genres.", "output": "select name from genre"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. The name contains values such as Music. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the names of different music genres?", "output": "select name from genre"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The state contains values such as NY. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingstate contains values such as NY. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find all the customer information in state NY.", "output": "select * from customer where state = \"NY\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The state contains values such as NY. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingstate contains values such as NY. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is all the customer information for customers in NY state?", "output": "select * from customer where state = \"NY\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. The city contains values such as Calgary. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the first names and last names of the employees who live in Calgary city.", "output": "select firstname, lastname from employee where city = \"Calgary\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. The city contains values such as Calgary. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the full names of employees living in the city of Calgary.", "output": "select firstname, lastname from employee where city = \"Calgary\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the distinct billing countries of the invoices?", "output": "select distinct(billingcountry) from invoice"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the different billing countries for all invoices.", "output": "select distinct(billingcountry) from invoice"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the names of all artists that have \"a\" in their names.", "output": "select name from artist where name like \"%a%\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the names of artist who have the letter 'a' in their names?", "output": "select name from artist where name like \"%a%\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. The name contains values such as AC/DC. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The composer contains values such as AC/DC. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the title of all the albums of the artist \"AC/DC\".", "output": "select title from album as t1 join artist as t2 on t1.artistid = t2.artistid where t2.name = \"AC/DC\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. The name contains values such as AC/DC. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The composer contains values such as AC/DC. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the titles of albums by the artist \"AC/DC\"?", "output": "select title from album as t1 join artist as t2 on t1.artistid = t2.artistid where t2.name = \"AC/DC\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. The name contains values such as Metallica. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The composer contains values such as Metallica. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Hom many albums does the artist \"Metallica\" have?", "output": "select count(*) from album as t1 join artist as t2 on t1.artistid = t2.artistid where t2.name = \"Metallica\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. The name contains values such as Metallica. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers.The composer contains values such as Metallica. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the number of albums by the artist \"Metallica\".", "output": "select count(*) from album as t1 join artist as t2 on t1.artistid = t2.artistid where t2.name = \"Metallica\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. The title contains values such as Balls to the Wall. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Balls to the Wall, Belong. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Which artist does the album \"Balls to the Wall\" belong to?", "output": "select t2.name from album as t1 join artist as t2 on t1.artistid = t2.artistid where t1.title = \"Balls to the Wall\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. The title contains values such as Balls to the Wall. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Balls to the Wall. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the name of the artist who made the album \"Balls to the Wall\".", "output": "select t2.name from album as t1 join artist as t2 on t1.artistid = t2.artistid where t1.title = \"Balls to the Wall\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as The Moth. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Which artist has the most albums?", "output": "select t2.name from album as t1 join artist as t2 on t1.artistid = t2.artistid group by t2.name order by count(*) desc limit 1"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the name of the artist with the greatest number of albums?", "output": "select t2.name from album as t1 join artist as t2 on t1.artistid = t2.artistid group by t2.name order by count(*) desc limit 1"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as World. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as The Worm. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the names of all the tracks that contain the word \"you\".", "output": "select name from track where name like '%you%'"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as World. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as The Worm. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the names of tracks that contain the the word you in them?", "output": "select name from track where name like '%you%'"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the average unit price of all the tracks?", "output": "select avg(unitprice) from track"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the average unit price for a track.", "output": "select avg(unitprice) from track"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the durations of the longest and the shortest tracks in milliseconds?", "output": "select max(milliseconds), min(milliseconds) from track"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the maximum and minimum durations of tracks in milliseconds.", "output": "select max(milliseconds), min(milliseconds) from track"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Show the album names, ids and the number of tracks for each album.", "output": "select t1.title, t2.albumid, count(*) from album as t1 join track as t2 on t1.albumid = t2.albumid group by t2.albumid"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the names and ids of the different albums, and how many tracks are on each?", "output": "select t1.title, t2.albumid, count(*) from album as t1 join track as t2 on t1.albumid = t2.albumid group by t2.albumid"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as The Moth. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the name of the most common genre in all tracks?", "output": "select t1.name from genre as t1 join track as t2 on t1.genreid = t2.genreid group by t2.genreid order by count(*) desc limit 1"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the name of the genre that is most frequent across all tracks.", "output": "select t1.name from genre as t1 join track as t2 on t1.genreid = t2.genreid group by t2.genreid order by count(*) desc limit 1"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the least common media type in all tracks?", "output": "select t1.name from mediatype as t1 join track as t2 on t1.mediatypeid = t2.mediatypeid group by t2.mediatypeid order by count(*) asc limit 1"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the name of the media type that is least common across all tracks?", "output": "select t1.name from mediatype as t1 join track as t2 on t1.mediatypeid = t2.mediatypeid group by t2.mediatypeid order by count(*) asc limit 1"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Show the album names and ids for albums that contain tracks with unit price bigger than 1.", "output": "select t1.title, t2.albumid from album as t1 join track as t2 on t1.albumid = t2.albumid where t2.unitprice > 1 group by t2.albumid"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the titles and ids for albums containing tracks with unit price greater than 1?", "output": "select t1.title, t2.albumid from album as t1 join track as t2 on t1.albumid = t2.albumid where t2.unitprice > 1 group by t2.albumid"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Rock. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Belong. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "How many tracks belong to rock genre?", "output": "select count(*) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Rock\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Rock. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Count the number of tracks that are part of the rock genre.", "output": "select count(*) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Rock\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Jazz. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Belong. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the average unit price of tracks that belong to Jazz genre?", "output": "select avg(unitprice) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Jazz\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Jazz. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the average unit price of jazz tracks.", "output": "select avg(unitprice) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Jazz\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The email contains values such as luisg@embraer.com.br. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Coma. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the first name and last name of the customer that has email \"luisg@embraer.com.br\"?", "output": "select firstname, lastname from customer where email = \"luisg@embraer.com.br\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The email contains values such as luisg@embraer.com.br. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Coma. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the full name of the customer with the email \"luisg@embraer.com.br\".", "output": "select firstname, lastname from customer where email = \"luisg@embraer.com.br\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Coma. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "How many customers have email that contains \"gmail.com\"?", "output": "select count(*) from customer where email like \"%gmail.com%\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers, Coma. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Count the number of customers that have an email containing \"gmail.com\".", "output": "select count(*) from customer where email like \"%gmail.com%\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The firstname contains values such as Leonie. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the first name and last name employee helps the customer with first name Leonie?", "output": "select t2.firstname, t2.lastname from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid where t1.firstname = \"Leonie\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The firstname contains values such as Leonie. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the full names of employees who help customers with the first name Leonie.", "output": "select t2.firstname, t2.lastname from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid where t1.firstname = \"Leonie\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What city does the employee who helps the customer with postal code 70174 live in?", "output": "select t2.city from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid where t1.postalcode = \"70174\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the cities corresponding to employees who help customers with the postal code 70174.", "output": "select t2.city from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid where t1.postalcode = \"70174\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "How many distinct cities does the employees live in?", "output": "select count(distinct city) from employee"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the number of different cities that employees live in.", "output": "select count(distinct city) from employee"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The firstname contains values such as Astrid.The lastname contains values such as Gruber. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.", "output": "select t2.invoicedate from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t1.firstname = \"Astrid\" and lastname = \"Gruber\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The firstname contains values such as Astrid.The lastname contains values such as Gruber. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the invoice dates for customers with the first name Astrid and the last name Gruber?", "output": "select t2.invoicedate from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t1.firstname = \"Astrid\" and lastname = \"Gruber\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find all the customer last names that do not have invoice totals larger than 20.", "output": "select lastname from customer except select t1.lastname from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t2.total > 20"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the last names of customers without invoice totals exceeding 20?", "output": "select lastname from customer except select t1.lastname from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t2.total > 20"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The country contains values such as Brazil. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingcountry contains values such as Brazil. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the first names of all customers that live in Brazil and have an invoice.", "output": "select distinct t1.firstname from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t1.country = \"Brazil\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The country contains values such as Brazil. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingcountry contains values such as Brazil. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the different first names for customers from Brazil who have also had an invoice?", "output": "select distinct t1.firstname from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t1.country = \"Brazil\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The country contains values such as Germany. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingcountry contains values such as Germany. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the address of all customers that live in Germany and have invoice.", "output": "select distinct t1.address from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t1.country = \"Germany\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The country contains values such as Germany. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingcountry contains values such as Germany. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the addresses of customers living in Germany who have had an invoice?", "output": "select distinct t1.address from customer as t1 join invoice as t2 on t1.customerid = t2.customerid where t1.country = \"Germany\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "List the phone numbers of all employees.", "output": "select phone from employee"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the phone numbers for each employee?", "output": "select phone from employee"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. The name contains values such as AAC audio file. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "How many tracks are in the AAC audio file media type?", "output": "select count(*) from mediatype as t1 join track as t2 on t1.mediatypeid = t2.mediatypeid where t1.name = \"AAC audio file\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. The name contains values such as AAC audio file. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Count the number of tracks that are of the media type \"AAC audio file\".", "output": "select count(*) from mediatype as t1 join track as t2 on t1.mediatypeid = t2.mediatypeid where t1.name = \"AAC audio file\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. The title contains values such as Pop. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Latin, Pop. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Belong. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?", "output": "select avg(milliseconds) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Latin\" or t1.name = \"Pop\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. The title contains values such as Pop. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Latin, Pop. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the average millisecond length of Latin and Pop tracks.", "output": "select avg(milliseconds) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Latin\" or t1.name = \"Pop\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Please. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Please show the employee first names and ids of employees who serve at least 10 customers.", "output": "select t1.firstname, t1.supportrepid from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid group by t1.supportrepid having count(*) >= 10"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the first names and support rep ids for employees serving 10 or more customers?", "output": "select t1.firstname, t1.supportrepid from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid group by t1.supportrepid having count(*) >= 10"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Please. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Please show the employee last names that serves no more than 20 customers.", "output": "select t1.lastname from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid group by t1.supportrepid having count(*) <= 20"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the last names of employees who serve at most 20 customers?", "output": "select t1.lastname from customer as t1 join employee as t2 on t1.supportrepid = t2.employeeid group by t1.supportrepid having count(*) <= 20"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Please. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Please list all album titles in alphabetical order.", "output": "select title from album order by title"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are all the album titles, in alphabetical order?", "output": "select title from album order by title"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Please. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Please list the name and id of all artists that have at least 3 albums in alphabetical order.", "output": "select t2.name, t1.artistid from album as t1 join artist as t2 on t1.artistid = t2.artistid group by t1.artistid having count(*) >= 3 order by t2.name"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the names and ids of artists with 3 or more albums, listed in alphabetical order?", "output": "select t2.name, t1.artistid from album as t1 join artist as t2 on t1.artistid = t2.artistid group by t1.artistid having count(*) >= 3 order by t2.name"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the names of artists that do not have any albums.", "output": "select name from artist except select t2.name from album as t1 join artist as t2 on t1.artistid = t2.artistid"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Release. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the names of artists who have not released any albums?", "output": "select name from artist except select t2.name from album as t1 join artist as t2 on t1.artistid = t2.artistid"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Rock. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What is the average unit price of rock tracks?", "output": "select avg(t2.unitprice) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Rock\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Rock. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the average unit price of tracks from the Rock genre.", "output": "select avg(t2.unitprice) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Rock\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. The title contains values such as Pop. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Pop. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the duration of the longest and shortest pop tracks in milliseconds?", "output": "select max(milliseconds), min(milliseconds) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Pop\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. The title contains values such as Pop. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Pop. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the maximum and minimum millisecond lengths of pop tracks.", "output": "select max(milliseconds), min(milliseconds) from genre as t1 join track as t2 on t1.genreid = t2.genreid where t1.name = \"Pop\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The city contains values such as Edmonton. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. The city contains values such as Edmonton. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingcity contains values such as Edmonton. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the birth dates of employees living in Edmonton?", "output": "select birthdate from employee where city = \"Edmonton\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. The city contains values such as Edmonton. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. The city contains values such as Edmonton. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. The billingcity contains values such as Edmonton. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the birth dates corresponding to employees who live in the city of Edmonton.", "output": "select birthdate from employee where city = \"Edmonton\""}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the distinct unit prices of all tracks?", "output": "select distinct(unitprice) from track"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the distinct unit prices for tracks.", "output": "select distinct(unitprice) from track"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "How many artists do not have any album?", "output": "select count(*) from artist where artistid not in(select artistid from album)"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The name contains values such as Release, Numbers. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Cound the number of artists who have not released an album.", "output": "select count(*) from artist where artistid not in(select artistid from album)"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Reggae, Rock. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?", "output": "select t1.title from album as t1 join track as t2 on t1.albumid = t2.albumid join genre as t3 on t2.genreid = t3.genreid where t3.name = 'Reggae' intersect select t1.title from album as t1 join track as t2 on t1.albumid = t2.albumid join genre as t3 on t2.genreid = t3.genreid where t3.name = 'Rock'"}, {"instruction": "chinook_1 contains tables such as album, artist, customer, employee, genre, invoice, invoiceline, mediatype, playlist, playlisttrack, track. Table album has columns such as albumid, title, artistid. albumid is the primary key. Table artist has columns such as artistid, name. artistid is the primary key. Table customer has columns such as customerid, firstname, lastname, company, address, city, state, country, postalcode, phone, fax, email, supportrepid. customerid is the primary key. Table employee has columns such as employeeid, lastname, firstname, title, reportsto, birthdate, hiredate, address, city, state, country, postalcode, phone, fax, email. employeeid is the primary key. Table genre has columns such as genreid, name. genreid is the primary key. The name contains values such as Reggae, Rock. Table invoice has columns such as invoiceid, customerid, invoicedate, billingaddress, billingcity, billingstate, billingcountry, billingpostalcode, total. invoiceid is the primary key. Table invoiceline has columns such as invoicelineid, invoiceid, trackid, unitprice, quantity. invoicelineid is the primary key. Table mediatype has columns such as mediatypeid, name. mediatypeid is the primary key. Table playlist has columns such as playlistid, name. playlistid is the primary key. Table playlisttrack has columns such as playlistid, trackid. playlistid is the primary key. Table track has columns such as trackid, name, albumid, mediatypeid, genreid, composer, milliseconds, bytes, unitprice. trackid is the primary key. The artistid of album is the foreign key of artistid of artist. The supportrepid of customer is the foreign key of employeeid of employee. The reportsto of employee is the foreign key of employeeid of employee. The customerid of invoice is the foreign key of customerid of customer. The trackid of invoiceline is the foreign key of trackid of track. The invoiceid of invoiceline is the foreign key of invoiceid of invoice. The trackid of playlisttrack is the foreign key of trackid of track. The playlistid of playlisttrack is the foreign key of playlistid of playlist. The mediatypeid of track is the foreign key of mediatypeid of mediatype. The genreid of track is the foreign key of genreid of genre. The albumid of track is the foreign key of albumid of album.", "input": "Find the titles of albums that contain tracks of both the Reggae and Rock genres.", "output": "select t1.title from album as t1 join track as t2 on t1.albumid = t2.albumid join genre as t3 on t2.genreid = t3.genreid where t3.name = 'Reggae' intersect select t1.title from album as t1 join track as t2 on t1.albumid = t2.albumid join genre as t3 on t2.genreid = t3.genreid where t3.name = 'Rock'"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find all the phone numbers.", "output": "select customer_phone from available_policies"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are all the phone numbers?", "output": "select customer_phone from available_policies"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. The policy_type_code contains values such as Life Insurance. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are the customer phone numbers under the policy \"Life Insurance\"?", "output": "select customer_phone from available_policies where policy_type_code = \"Life Insurance\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. The policy_type_code contains values such as Life Insurance. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are the phone numbers of customers using the policy with the code \"Life Insurance\"?", "output": "select customer_phone from available_policies where policy_type_code = \"Life Insurance\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Which policy type has the most records in the database?", "output": "select policy_type_code from available_policies group by policy_type_code order by count(*) desc limit 1"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Which policy type appears most frequently in the available policies?", "output": "select policy_type_code from available_policies group by policy_type_code order by count(*) desc limit 1"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are all the customer phone numbers under the most popular policy type?", "output": "select customer_phone from available_policies where policy_type_code = (select policy_type_code from available_policies group by policy_type_code order by count(*) desc limit 1)"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the phone numbers of customers using the most common policy type among the available policies.", "output": "select customer_phone from available_policies where policy_type_code = (select policy_type_code from available_policies group by policy_type_code order by count(*) desc limit 1)"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the policy type used by more than 4 customers.", "output": "select policy_type_code from available_policies group by policy_type_code having count(*) > 4"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the policy types more than 4 customers use. Show their type code.", "output": "select policy_type_code from available_policies group by policy_type_code having count(*) > 4"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the total and average amount of settlements.", "output": "select sum(settlement_amount), avg(settlement_amount) from settlements"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Return the sum and average of all settlement amounts.", "output": "select sum(settlement_amount), avg(settlement_amount) from settlements"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the name of services that have been used for more than 2 times in first notification of loss.", "output": "select t2.service_name from first_notification_of_loss as t1 join services as t2 on t1.service_id = t2.service_id group by t1.service_id having count(*) > 2"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Which services have been used more than twice in first notification of loss? Return the service name.", "output": "select t2.service_name from first_notification_of_loss as t1 join services as t2 on t1.service_id = t2.service_id group by t1.service_id having count(*) > 2"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What is the effective date of the claim that has the largest amount of total settlement?", "output": "select t1.effective_date from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id order by sum(t2.settlement_amount) desc limit 1"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the claim that has the largest total settlement amount. Return the effective date of the claim.", "output": "select t1.effective_date from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id order by sum(t2.settlement_amount) desc limit 1"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. The customer_name contains values such as Dayana Robel. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "How many policies are listed for the customer named \"Dayana Robel\"?", "output": "select count(*) from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Dayana Robel\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. The customer_name contains values such as Dayana Robel. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Count the total number of policies used by the customer named \"Dayana Robel\".", "output": "select count(*) from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Dayana Robel\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What is the name of the customer who has the most policies listed?", "output": "select t1.customer_name from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_name order by count(*) desc limit 1"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Which customer uses the most policies? Give me the customer name.", "output": "select t1.customer_name from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_name order by count(*) desc limit 1"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. The customer_name contains values such as Dayana Robel. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are all the policy types of the customer named \"Dayana Robel\"?", "output": "select distinct t3.policy_type_code from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id join available_policies as t3 on t2.policy_id = t3.policy_id where t1.customer_name = \"Dayana Robel\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. The customer_name contains values such as Dayana Robel. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Tell me the types of the policy used by the customer named \"Dayana Robel\".", "output": "select distinct t3.policy_type_code from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id join available_policies as t3 on t2.policy_id = t3.policy_id where t1.customer_name = \"Dayana Robel\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are all the policy types of the customer that has the most policies listed?", "output": "select distinct t3.policy_type_code from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id join available_policies as t3 on t2.policy_id = t3.policy_id where t1.customer_name = (select t1.customer_name from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_name order by count(*) desc limit 1)"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "List all the policy types used by the customer enrolled in the most policies.", "output": "select distinct t3.policy_type_code from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id join available_policies as t3 on t2.policy_id = t3.policy_id where t1.customer_name = (select t1.customer_name from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_name order by count(*) desc limit 1)"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "List all the services in the alphabetical order.", "output": "select service_name from services order by service_name"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Give me a list of all the service names sorted alphabetically.", "output": "select service_name from services order by service_name"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "How many services are there?", "output": "select count(*) from services"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Count the total number of available services.", "output": "select count(*) from services"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the names of users who do not have a first notification of loss record.", "output": "select customer_name from customers except select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Which customers do not have a first notification of loss record? Give me the customer names.", "output": "select customer_name from customers except select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. The service_name contains values such as Upgrade a policy, Close a policy. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the names of customers who have used either the service \"Close a policy\" or the service \"Upgrade a policy\".", "output": "select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id join services as t3 on t2.service_id = t3.service_id where t3.service_name = \"Close a policy\" or t3.service_name = \"Upgrade a policy\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. The service_name contains values such as Upgrade a policy, Close a policy. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Which customers have used the service named \"Close a policy\" or \"Upgrade a policy\"? Give me the customer names.", "output": "select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id join services as t3 on t2.service_id = t3.service_id where t3.service_name = \"Close a policy\" or t3.service_name = \"Upgrade a policy\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. The service_name contains values such as New policy application, Close a policy. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the names of customers who have used both the service \"Close a policy\" and the service \"New policy application\".", "output": "select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id join services as t3 on t2.service_id = t3.service_id where t3.service_name = \"Close a policy\" intersect select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id join services as t3 on t2.service_id = t3.service_id where t3.service_name = \"New policy application\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. The service_name contains values such as Upgrade a policy, Close a policy. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Which customers have used both the service named \"Close a policy\" and the service named \"Upgrade a policy\"? Give me the customer names.", "output": "select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id join services as t3 on t2.service_id = t3.service_id where t3.service_name = \"Close a policy\" intersect select t1.customer_name from customers as t1 join first_notification_of_loss as t2 on t1.customer_id = t2.customer_id join services as t3 on t2.service_id = t3.service_id where t3.service_name = \"New policy application\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the IDs of customers whose name contains \"Diana\".", "output": "select customer_id from customers where customer_name like \"%diana%\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are the IDs of customers who have \"Diana\" in part of their names?", "output": "select customer_id from customers where customer_name like \"%diana%\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are the maximum and minimum settlement amount on record?", "output": "select max(settlement_amount), min(settlement_amount) from settlements"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Find the maximum and minimum settlement amount.", "output": "select max(settlement_amount), min(settlement_amount) from settlements"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "List all the customers in increasing order of IDs.", "output": "select customer_id, customer_name from customers order by customer_id asc"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What is the ordered list of customer ids?", "output": "select customer_id, customer_name from customers order by customer_id asc"}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "Retrieve the open and close dates of all the policies associated with the customer whose name contains \"Diana\"", "output": "select t2.date_opened, t2.date_closed from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id where t1.customer_name like \"%diana%\""}, {"instruction": "insurance_fnol contains tables such as customers, services, available_policies, customers_policies, first_notification_of_loss, claims, settlements. Table customers has columns such as customer_id, customer_name. customer_id is the primary key. Table services has columns such as service_id, service_name. service_id is the primary key. Table available_policies has columns such as policy_id, policy_type_code, customer_phone. policy_id is the primary key. Table customers_policies has columns such as customer_id, policy_id, date_opened, date_closed. customer_id is the primary key. Table first_notification_of_loss has columns such as fnol_id, customer_id, policy_id, service_id. fnol_id is the primary key. Table claims has columns such as claim_id, fnol_id, effective_date. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, effective_date, settlement_amount. settlement_id is the primary key. The policy_id of customers_policies is the foreign key of policy_id of available_policies. The customer_id of customers_policies is the foreign key of customer_id of customers. The customer_id of first_notification_of_loss is the foreign key of customer_id of customers_policies. The policy_id of first_notification_of_loss is the foreign key of policy_id of customers_policies. The service_id of first_notification_of_loss is the foreign key of service_id of services. The fnol_id of claims is the foreign key of fnol_id of first_notification_of_loss. The claim_id of settlements is the foreign key of claim_id of claims.", "input": "What are the open and close dates of all the policies used by the customer who have \"Diana\" in part of their names?", "output": "select t2.date_opened, t2.date_closed from customers as t1 join customers_policies as t2 on t1.customer_id = t2.customer_id where t1.customer_name like \"%diana%\""}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "How many kinds of enzymes are there?", "output": "select count(*) from enzyme"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the total count of enzymes?", "output": "select count(*) from enzyme"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "List the name of enzymes in descending lexicographical order.", "output": "select name from enzyme order by name desc"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names of enzymes in descending order?", "output": "select name from enzyme order by name desc"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "List the names and the locations that the enzymes can make an effect.", "output": "select name, location from enzyme"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names and locations of all enzymes listed?", "output": "select name, location from enzyme"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the maximum Online Mendelian Inheritance in Man (OMIM) value of the enzymes?", "output": "select max(omim) from enzyme"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the maximum OMIM value in the database?", "output": "select max(omim) from enzyme"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The location contains values such as Cytosol. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the product, chromosome and porphyria related to the enzymes which take effect at the location 'Cytosol'?", "output": "select product, chromosome, porphyria from enzyme where location = 'Cytosol'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The location contains values such as Cytosol. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the product, chromosome, and porphyria of the enzymes located at 'Cytosol'?", "output": "select product, chromosome, porphyria from enzyme where location = 'Cytosol'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The product contains values such as Heme. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names of enzymes who does not produce 'Heme'?", "output": "select name from enzyme where product != 'Heme'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The product contains values such as Heme. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names of enzymes whose product is not 'Heme'?", "output": "select name from enzyme where product != 'Heme'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. The fda_approved contains values such as Yes. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names and trade names of the medicines which has 'Yes' value in the FDA record?", "output": "select name, trade_name from medicine where fda_approved = 'Yes'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names and trade names of the medcines that are FDA approved?", "output": "select name, trade_name from medicine where fda_approved = 'Yes'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. The name contains values such as Amisulpride. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The interaction_type contains values such as inhibitor. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names of enzymes in the medicine named 'Amisulpride' that can serve as an 'inhibitor'?", "output": "select t1.name from enzyme as t1 join medicine_enzyme_interaction as t2 on t1.id = t2.enzyme_id join medicine as t3 on t2.medicine_id = t3.id where t3.name = 'Amisulpride' and t2.interaction_type = 'inhibitor'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. The name contains values such as Amisulpride. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The interaction_type contains values such as inhibitor. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors?", "output": "select t1.name from enzyme as t1 join medicine_enzyme_interaction as t2 on t1.id = t2.enzyme_id join medicine as t3 on t2.medicine_id = t3.id where t3.name = 'Amisulpride' and t2.interaction_type = 'inhibitor'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the ids and names of the medicine that can interact with two or more enzymes?", "output": "select t1.id, t1.name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id group by t1.id having count(*) >= 2"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "For every medicine id, what are the names of the medicines that can interact with more than one enzyme?", "output": "select t1.id, t1.name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id group by t1.id having count(*) >= 2"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the ids, names and FDA approval status of medicines in descending order of the number of enzymes that it can interact with.", "output": "select t1.id, t1.name, t1.fda_approved from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id group by t1.id order by count(*) desc"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?", "output": "select t1.id, t1.name, t1.fda_approved from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id group by t1.id order by count(*) desc"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the id and name of the enzyme with most number of medicines that can interact as 'activator'?", "output": "select t1.id, t1.name from enzyme as t1 join medicine_enzyme_interaction as t2 on t1.id = t2.enzyme_id where t2.interaction_type = 'activitor' group by t1.id order by count(*) desc limit 1"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the id and name of the enzyme that can interact with the most medicines as an activator?", "output": "select t1.id, t1.name from enzyme as t1 join medicine_enzyme_interaction as t2 on t1.id = t2.enzyme_id where t2.interaction_type = 'activitor' group by t1.id order by count(*) desc limit 1"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. The name contains values such as Aripiprazole. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The name contains values such as ALA synthase. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "output": "select t1.interaction_type from medicine_enzyme_interaction as t1 join medicine as t2 on t1.medicine_id = t2.id join enzyme as t3 on t1.enzyme_id = t3.id where t3.name = 'ALA synthase' and t2.name = 'Aripiprazole'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. The name contains values such as Aripiprazole. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The name contains values such as ALA synthase. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?", "output": "select t1.interaction_type from medicine_enzyme_interaction as t1 join medicine as t2 on t1.medicine_id = t2.id join enzyme as t3 on t1.enzyme_id = t3.id where t3.name = 'ALA synthase' and t2.name = 'Aripiprazole'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the most common interaction type between enzymes and medicine? And how many are there?", "output": "select interaction_type, count(*) from medicine_enzyme_interaction group by interaction_type order by count(*) desc limit 1"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the most common types of interactions between enzymes and medicine, and how many types are there?", "output": "select interaction_type, count(*) from medicine_enzyme_interaction group by interaction_type order by count(*) desc limit 1"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. The fda_approved contains values such as No. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "How many medicines have the FDA approval status 'No' ?", "output": "select count(*) from medicine where fda_approved = 'No'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "How many medicines were not approved by the FDA?", "output": "select count(*) from medicine where fda_approved = 'No'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "How many enzymes do not have any interactions?", "output": "select count(*) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction );"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the count of enzymes without any interactions?", "output": "select count(*) from enzyme where id not in ( select enzyme_id from medicine_enzyme_interaction );"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What is the id and trade name of the medicines can interact with at least 3 enzymes?", "output": "select t1.id, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id group by t1.id having count(*) >= 3"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the ids and trade names of the medicine that can interact with at least 3 enzymes?", "output": "select t1.id, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id group by t1.id having count(*) >= 3"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The interaction_type contains values such as inhibitor. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?", "output": "select distinct t1.name, t1.location, t1.product from enzyme as t1 join medicine_enzyme_interaction as t2 on t2.enzyme_id = t1.id where t2.interaction_type = 'inhibitor'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The interaction_type contains values such as inhibitor. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the different names, locations, and products of the enzymes that are capable inhibitor interactions?", "output": "select distinct t1.name, t1.location, t1.product from enzyme as t1 join medicine_enzyme_interaction as t2 on t2.enzyme_id = t1.id where t2.interaction_type = 'inhibitor'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The interaction_type contains values such as activitor, inhibitor. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.", "output": "select t1.name, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id where interaction_type = 'inhibitor' intersect select t1.name, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id where interaction_type = 'activitor'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The interaction_type contains values such as activitor, inhibitor. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the medicine and trade names that can interact as an inhibitor and activitor with enzymes?", "output": "select t1.name, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id where interaction_type = 'inhibitor' intersect select t1.name, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id where interaction_type = 'activitor'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The product contains values such as Heme. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.", "output": "select name, trade_name from medicine except select t1.name, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id join enzyme as t3 on t3.id = t2.enzyme_id where t3.product = 'Protoporphyrinogen IX'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. The product contains values such as Heme. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?", "output": "select name, trade_name from medicine except select t1.name, t1.trade_name from medicine as t1 join medicine_enzyme_interaction as t2 on t2.medicine_id = t1.id join enzyme as t3 on t3.id = t2.enzyme_id where t3.product = 'Protoporphyrinogen IX'"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "How many distinct FDA approval statuses are there for the medicines?", "output": "select count(distinct fda_approved) from medicine"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "How many different FDA approval statuses exist for medicines?", "output": "select count(distinct fda_approved) from medicine"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "Which enzyme names have the substring \"ALA\"?", "output": "select name from enzyme where name like \"%ala%\""}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "What are the names of enzymes that include the string 'ALA'?", "output": "select name from enzyme where name like \"%ala%\""}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "find the number of medicines offered by each trade.", "output": "select trade_name, count(*) from medicine group by trade_name"}, {"instruction": "medicine_enzyme_interaction contains tables such as medicine, enzyme, medicine_enzyme_interaction. Table medicine has columns such as id, name, trade_name, fda_approved. id is the primary key. Table enzyme has columns such as id, name, location, product, chromosome, omim, porphyria. id is the primary key. Table medicine_enzyme_interaction has columns such as enzyme_id, medicine_id, interaction_type. enzyme_id is the primary key. The medicine_id of medicine_enzyme_interaction is the foreign key of id of medicine. The enzyme_id of medicine_enzyme_interaction is the foreign key of id of enzyme.", "input": "How many medicines are offered by each trade name?", "output": "select trade_name, count(*) from medicine group by trade_name"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "List all schools and their nicknames in the order of founded year.", "output": "select school, nickname from university order by founded"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the different schools and their nicknames, ordered by their founding years?", "output": "select school, nickname from university order by founded"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The affiliation contains values such as Public. The school_id of basketball_match is the foreign key of school_id of university.", "input": "List all public schools and their locations.", "output": "select school, location from university where affiliation = 'Public'"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The affiliation contains values such as Public. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the public schools and what are their locations?", "output": "select school, location from university where affiliation = 'Public'"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "When was the school with the largest enrollment founded?", "output": "select founded from university order by enrollment desc limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Return the founded year for the school with the largest enrollment.", "output": "select founded from university order by enrollment desc limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The affiliation contains values such as Public. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find the founded year of the newest non public school.", "output": "select founded from university where affiliation != 'Public' order by founded desc limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The affiliation contains values such as Public. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What is the founded year of the non public school that was founded most recently?", "output": "select founded from university where affiliation != 'Public' order by founded desc limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "How many schools are in the basketball match?", "output": "select count(distinct school_id) from basketball_match"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Count the number of schools that have had basketball matches.", "output": "select count(distinct school_id) from basketball_match"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What is the highest acc percent score in the competition?", "output": "select acc_percent from basketball_match order by acc_percent desc limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Return the highest acc percent across all basketball matches.", "output": "select acc_percent from basketball_match order by acc_percent desc limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What is the primary conference of the school that has the lowest acc percent score in the competition?", "output": "select t1.primary_conference from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id order by t2.acc_percent limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Return the primary conference of the school with the lowest acc percentage score.", "output": "select t1.primary_conference from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id order by t2.acc_percent limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What is the team name and acc regular season score of the school that was founded for the longest time?", "output": "select t2.team_name, t2.acc_regular_season from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id order by t1.founded limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Return the name of the team and the acc during the regular season for the school that was founded the earliest.", "output": "select t2.team_name, t2.acc_regular_season from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id order by t1.founded limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. The team_name contains values such as Clemson. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find the location and all games score of the school that has Clemson as its team name.", "output": "select t2.all_games, t1.location from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id where team_name = 'Clemson'"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. The team_name contains values such as Clemson. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the all games score and location of the school called Clemson?", "output": "select t2.all_games, t1.location from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id where team_name = 'Clemson'"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the average enrollment size of the universities that are founded before 1850?", "output": "select avg(enrollment) from university where founded < 1850"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Return the average enrollment of universities founded before 1850.", "output": "select avg(enrollment) from university where founded < 1850"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Show the enrollment and primary_conference of the oldest college.", "output": "select enrollment, primary_conference from university order by founded limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the enrollment and primary conference for the university which was founded the earliest?", "output": "select enrollment, primary_conference from university order by founded limit 1"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What is the total and minimum enrollment of all schools?", "output": "select sum(enrollment), min(enrollment) from university"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Return the total and minimum enrollments across all schools.", "output": "select sum(enrollment), min(enrollment) from university"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find the total student enrollment for different affiliation type schools.", "output": "select sum(enrollment), affiliation from university group by affiliation"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the total enrollments of universities of each affiliation type?", "output": "select sum(enrollment), affiliation from university group by affiliation"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "How many schools do not participate in the basketball match?", "output": "select count(*) from university where school_id not in (select school_id from basketball_match)"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Count the number of universities that do not participate in the baketball match.", "output": "select count(*) from university where school_id not in (select school_id from basketball_match)"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The affiliation contains values such as Public. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find the schools that were either founded after 1850 or public.", "output": "select school from university where founded > 1850 or affiliation = 'Public'"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The affiliation contains values such as Public. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the schools that were either founded before 1850 or are public?", "output": "select school from university where founded > 1850 or affiliation = 'Public'"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find how many different affiliation types there are.", "output": "select count(distinct affiliation) from university"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Count the number of different affiliation types.", "output": "select count(distinct affiliation) from university"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find how many school locations have the word 'NY'.", "output": "select count(*) from university where location like \"%ny%\""}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "How many universities have a location that contains NY?", "output": "select count(*) from university where location like \"%ny%\""}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find the team names of the universities whose enrollments are smaller than the average enrollment size.", "output": "select t2.team_name from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id where enrollment < (select avg(enrollment) from university)"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the names of teams from universities that have a below average enrollment?", "output": "select t2.team_name from university as t1 join basketball_match as t2 on t1.school_id = t2.school_id where enrollment < (select avg(enrollment) from university)"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find the number of universities that have over a 20000 enrollment size for each affiliation type.", "output": "select count(*), affiliation from university where enrollment > 20000 group by affiliation"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the different affiliations, and how many schools with each have an enrollment size of above 20000?", "output": "select count(*), affiliation from university where enrollment > 20000 group by affiliation"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.", "output": "select sum(enrollment), affiliation from university where founded > 1850 group by affiliation"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the different affiliations, and what is the total enrollment of schools founded after 1850 for each enrollment type?", "output": "select sum(enrollment), affiliation from university where founded > 1850 group by affiliation"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What is the maximum enrollment across all schools?", "output": "select max(enrollment) from university"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "Return the maximum enrollment across all schools.", "output": "select max(enrollment) from university"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "List all information regarding the basketball match.", "output": "select * from basketball_match"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What is all the information about the basketball match?", "output": "select * from basketball_match"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "List names of all teams in the basketball competition, ordered by all home scores in descending order.", "output": "select team_name from basketball_match order by all_home desc"}, {"instruction": "university_basketball contains tables such as basketball_match, university. Table basketball_match has columns such as team_id, school_id, team_name, acc_regular_season, acc_percent, acc_home, acc_road, all_games, all_games_percent, all_home, all_road, all_neutral. team_id is the primary key. Table university has columns such as school_id, school, location, founded, affiliation, enrollment, nickname, primary_conference. school_id is the primary key. The school_id of basketball_match is the foreign key of school_id of university.", "input": "What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?", "output": "select team_name from basketball_match order by all_home desc"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "the names of models that launched between 2002 and 2004.", "output": "select model_name from chip_model where launch_year between 2002 and 2004;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Which model has the least amount of RAM? List the model name and the amount of RAM.", "output": "select model_name, ram_mib from chip_model order by ram_mib asc limit 1;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The hardware_model_name contains values such as LG-P760. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "What are the chip model and screen mode of the phone with hardware model name \"LG-P760\"?", "output": "select chip_model, screen_mode from phone where hardware_model_name = \"LG-P760\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The company_name contains values such as Nokia Corporation. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "How many phone hardware models are produced by the company named \"Nokia Corporation\"?", "output": "select count(*) from phone where company_name = \"Nokia Corporation\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The company_name contains values such as Nokia Corporation. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "What is maximum and minimum RAM size of phone produced by company named \"Nokia Corporation\"?", "output": "select max(t1.ram_mib), min(t1.ram_mib) from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model where t2.company_name = \"Nokia Corporation\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The company_name contains values such as Nokia Corporation. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "What is the average ROM size of phones produced by the company named \"Nokia Corporation\"?", "output": "select avg(t1.rom_mib) from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model where t2.company_name = \"Nokia Corporation\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the hardware model name and company name for all the phones that were launched in year 2002 or have RAM size greater than 32.", "output": "select t2.hardware_model_name, t2.company_name from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model where t1.launch_year = 2002 or t1.ram_mib > 32;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The accreditation_type contains values such as Full. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.", "output": "select hardware_model_name, company_name from phone where accreditation_type like 'Full';"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The hardware_model_name contains values such as LG-P760. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is \"LG-P760\".", "output": "select t1.char_cells, t1.pixels, t1.hardware_colours from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t2.hardware_model_name = \"LG-P760\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. The type contains values such as Graphics. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the hardware model name and company name for the phone whose screen mode type is \"Graphics.\"", "output": "select t2.hardware_model_name, t2.company_name from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t1.type = \"Graphics\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.", "output": "select company_name, count(*) from phone group by company_name order by count(*) asc limit 1;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the name of the company that produced more than one phone model.", "output": "select company_name from phone group by company_name having count(*) > 1;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the maximum, minimum and average number of used kb in screen mode.", "output": "select max(used_kb), min(used_kb), avg(used_kb) from screen_mode;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the name of the phone model launched in year 2002 and with the highest RAM size.", "output": "select t2.hardware_model_name from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model where t1.launch_year = 2002 order by t1.ram_mib desc limit 1;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The hardware_model_name contains values such as LG-P760. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "What are the wifi and screen mode type of the hardware model named \"LG-P760\"?", "output": "select t1.wifi, t3.type from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model join screen_mode as t3 on t2.screen_mode = t3.graphics_mode where t2.hardware_model_name = \"LG-P760\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. The type contains values such as Text. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the hardware model name for the phones that have screen mode type \"Text\" or RAM size greater than 32.", "output": "select t2.hardware_model_name from chip_model as t1 join phone as t2 on t1.model_name = t2.chip_model join screen_mode as t3 on t2.screen_mode = t3.graphics_mode where t3.type = \"Text\" or t1.ram_mib > 32;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. The type contains values such as Graphics. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The company_name contains values such as Nokia Corporation. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the hardware model name for the phones that were produced by \"Nokia Corporation\" or whose screen mode type is \"Graphics.\"", "output": "select distinct t2.hardware_model_name from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t1.type = \"Graphics\" or t2.company_name = \"Nokia Corporation\""}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. The type contains values such as Text. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The company_name contains values such as Nokia Corporation. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the hardware model name for the phons that were produced by \"Nokia Corporation\" but whose screen mode type is not Text.", "output": "select distinct t2.hardware_model_name from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t2.company_name = \"Nokia Corporation\" and t1.type != \"Text\";"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.", "output": "select distinct t2.hardware_model_name, t2.company_name from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t1.used_kb between 10 and 15;"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the number of phones for each accreditation type.", "output": "select accreditation_type, count(*) from phone group by accreditation_type"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "How many phones belongs to each accreditation type?", "output": "select accreditation_type, count(*) from phone group by accreditation_type"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the accreditation level that more than 3 phones use.", "output": "select accreditation_level from phone group by accreditation_level having count(*) > 3"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the details for all chip models.", "output": "select * from chip_model"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "How many models do not have the wifi function?", "output": "select count(*) from chip_model where wifi = 'No'"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Count the number of chip model that do not have wifi.", "output": "select count(*) from chip_model where wifi = 'No'"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "List all the model names sorted by their launch year.", "output": "select model_name from chip_model order by launch_year"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the average ram mib size of the chip models that are never used by any phone.", "output": "select avg(ram_mib) from chip_model where model_name not in (select chip_model from phone)"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The accreditation_type contains values such as Full. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the names of the chip models that are not used by any phone with full accreditation type.", "output": "select model_name from chip_model except select chip_model from phone where accreditation_type = 'Full'"}, {"instruction": "phone_1 contains tables such as chip_model, screen_mode, phone. Table chip_model has columns such as model_name, launch_year, ram_mib, rom_mib, slots, wifi, bluetooth. model_name is the primary key. Table screen_mode has columns such as graphics_mode, char_cells, pixels, hardware_colours, used_kb, map, type. graphics_mode is the primary key. Table phone has columns such as company_name, hardware_model_name, accreditation_type, accreditation_level, date, chip_model, screen_mode. hardware_model_name is the primary key. The accreditation_type contains values such as Provisional, Full. The chip_model of phone is the foreign key of model_name of chip_model. The screen_mode of phone is the foreign key of graphics_mode of screen_mode.", "input": "Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.", "output": "select t1.pixels from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t2.accreditation_type = 'Provisional' intersect select t1.pixels from screen_mode as t1 join phone as t2 on t1.graphics_mode = t2.screen_mode where t2.accreditation_type = 'Full'"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "How many countries are there in total?", "output": "select count(*) from country"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Count the number of countries.", "output": "select count(*) from country"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the country name and capital of all countries.", "output": "select country_name, capital from country"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the names and capitals of each country?", "output": "select country_name, capital from country"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. The official_native_language contains values such as English. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show all official native languages that contain the word \"English\".", "output": "select official_native_language from country where official_native_language like \"%english%\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. The official_native_language contains values such as English. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the official native languages that contain the string \"English\".", "output": "select official_native_language from country where official_native_language like \"%english%\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show all distinct positions of matches.", "output": "select distinct position from match_season"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the different positions for match season?", "output": "select distinct position from match_season"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The college contains values such as UCLA. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the players from college UCLA.", "output": "select player from match_season where college = \"UCLA\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The college contains values such as UCLA. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Who are the players from UCLA?", "output": "select player from match_season where college = \"UCLA\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The college contains values such as UCLA, Duke. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the distinct position of players from college UCLA or Duke.", "output": "select distinct position from match_season where college = \"UCLA\" or college = \"Duke\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The college contains values such as UCLA, Duke. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the different positions of players from UCLA or Duke colleges?", "output": "select distinct position from match_season where college = \"UCLA\" or college = \"Duke\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the draft pick numbers and draft classes of players whose positions are defenders.", "output": "select draft_pick_number, draft_class from match_season where position = \"Defender\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the draft pick numbers and draft classes for players who play the Defender position?", "output": "select draft_pick_number, draft_class from match_season where position = \"Defender\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "How many distinct teams are involved in match seasons?", "output": "select count(distinct team) from match_season"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Count the number of different teams involved in match season.", "output": "select count(distinct team) from match_season"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the players and the years played.", "output": "select player, years_played from player"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Who are the different players and how many years has each played?", "output": "select player, years_played from player"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show all team names.", "output": "select name from team"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the names of all teams?", "output": "select name from team"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the season, the player, and the name of the country that player belongs to.", "output": "select t2.season, t2.player, t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "For each player, what are their name, season, and country that they belong to?", "output": "select t2.season, t2.player, t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. The country_name contains values such as Indonesia. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Which players are from Indonesia?", "output": "select t2.player from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.country_name = \"Indonesia\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. The country_name contains values such as Indonesia. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Who are the players from Indonesia?", "output": "select t2.player from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.country_name = \"Indonesia\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. The capital contains values such as Dublin. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the distinct positions of the players from a country whose capital is Dublin?", "output": "select distinct t2.position from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.capital = \"Dublin\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. The capital contains values such as Dublin. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Give the different positions of players who play for the country with the capital Dublin.", "output": "select distinct t2.position from country as t1 join match_season as t2 on t1.country_id = t2.country where t1.capital = \"Dublin\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The college contains values such as Maryland, Duke. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the official languages of the countries of players from Maryland or Duke college?", "output": "select t1.official_native_language from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.college = \"Maryland\" or t2.college = \"Duke\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The college contains values such as Maryland, Duke. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Return the official native languages of countries who have players from Maryland or Duke colleges.", "output": "select t1.official_native_language from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.college = \"Maryland\" or t2.college = \"Duke\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "How many distinct official languages are there among countries of players whose positions are defenders.", "output": "select count(distinct t1.official_native_language) from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = \"Defender\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Count the number of different official languages corresponding to countries that players who play Defender are from.", "output": "select count(distinct t1.official_native_language) from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = \"Defender\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the season, the player, and the name of the team that players belong to.", "output": "select t1.season, t1.player, t2.name from match_season as t1 join team as t2 on t1.team = t2.team_id"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Who are the different players, what season do they play in, and what is the name of the team they are on?", "output": "select t1.season, t1.player, t2.name from match_season as t1 join team as t2 on t1.team = t2.team_id"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. The name contains values such as Ryley Goldner. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the positions of the players from the team with name \"Ryley Goldner\".", "output": "select t1.position from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = \"Ryley Goldner\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. The name contains values such as Ryley Goldner. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Return the positions of players on the team Ryley Goldner.", "output": "select t1.position from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = \"Ryley Goldner\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. The name contains values such as Columbus Crew. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "How many distinct colleges are associated with players from the team with name \"Columbus Crew\".", "output": "select count(distinct t1.college) from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = \"Columbus Crew\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. The name contains values such as Columbus Crew. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Count the number of different colleges that players who play for Columbus Crew are from.", "output": "select count(distinct t1.college) from match_season as t1 join team as t2 on t1.team = t2.team_id where t2.name = \"Columbus Crew\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. The name contains values such as Columbus Crew. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the players and years played for players from team \"Columbus Crew\".", "output": "select t1.player, t1.years_played from player as t1 join team as t2 on t1.team = t2.team_id where t2.name = \"Columbus Crew\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. The name contains values such as Columbus Crew. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the players who played for Columbus Crew, and how many years did each play for?", "output": "select t1.player, t1.years_played from player as t1 join team as t2 on t1.team = t2.team_id where t2.name = \"Columbus Crew\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the position of players and the corresponding number of players.", "output": "select position, count(*) from match_season group by position"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "How many players played each position?", "output": "select position, count(*) from match_season group by position"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the country names and the corresponding number of players.", "output": "select country_name, count(*) from country as t1 join match_season as t2 on t1.country_id = t2.country group by t1.country_name"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "How many players are from each country?", "output": "select country_name, count(*) from country as t1 join match_season as t2 on t1.country_id = t2.country group by t1.country_name"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Return all players sorted by college in ascending alphabetical order.", "output": "select player from match_season order by college asc"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are all the players who played in match season, sorted by college in ascending alphabetical order?", "output": "select player from match_season order by college asc"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the most common position of players in match seasons.", "output": "select position from match_season group by position order by count(*) desc limit 1"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What is the position that is most common among players in match seasons?", "output": "select position from match_season group by position order by count(*) desc limit 1"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the top 3 most common colleges of players in match seasons.", "output": "select college from match_season group by college order by count(*) desc limit 3"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the three colleges from which the most players are from?", "output": "select college from match_season group by college order by count(*) desc limit 3"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the name of colleges that have at least two players.", "output": "select college from match_season group by college having count(*) >= 2"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the names of all colleges that have two or more players?", "output": "select college from match_season group by college having count(*) >= 2"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Show the name of colleges that have at least two players in descending alphabetical order.", "output": "select college from match_season group by college having count(*) >= 2 order by college desc"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the names of colleges that have two or more players, listed in descending alphabetical order?", "output": "select college from match_season group by college having count(*) >= 2 order by college desc"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the names of teams that do no have match season record?", "output": "select name from team where team_id not in (select team from match_season)"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Return the names of teams that have no match season record.", "output": "select name from team where team_id not in (select team from match_season)"}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Forward, Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "What are the names of countries that have both players with position forward and players with position defender?", "output": "select t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = \"Forward\" intersect select t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = \"Defender\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Forward, Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.", "output": "select t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = \"Forward\" intersect select t1.country_name from country as t1 join match_season as t2 on t1.country_id = t2.country where t2.position = \"Defender\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Midfielder, Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Which college have both players with position midfielder and players with position defender?", "output": "select college from match_season where position = \"Midfielder\" intersect select college from match_season where position = \"Defender\""}, {"instruction": "match_season contains tables such as country, team, match_season, player. Table country has columns such as country_id, country_name, capital, official_native_language. country_id is the primary key. Table team has columns such as team_id, name. team_id is the primary key. Table match_season has columns such as season, player, position, country, team, draft_pick_number, draft_class, college. season is the primary key. The position contains values such as Midfielder, Defender. Table player has columns such as player_id, player, years_played, total_wl, singles_wl, doubles_wl, team. player_id is the primary key. The team of match_season is the foreign key of team_id of team. The country of match_season is the foreign key of country_id of country. The team of player is the foreign key of team_id of team.", "input": "Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.", "output": "select college from match_season where position = \"Midfielder\" intersect select college from match_season where position = \"Defender\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "How many climbers are there?", "output": "select count(*) from climber"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Count the number of climbers.", "output": "select count(*) from climber"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "List the names of climbers in descending order of points.", "output": "select name from climber order by points desc"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the names of the climbers, ordered by points descending?", "output": "select name from climber order by points desc"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The country contains values such as Switzerland. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "List the names of climbers whose country is not Switzerland.", "output": "select name from climber where country != \"Switzerland\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The country contains values such as Switzerland. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the names of climbers who are not from the country of Switzerland?", "output": "select name from climber where country != \"Switzerland\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The country contains values such as United Kingdom. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What is the maximum point for climbers whose country is United Kingdom?", "output": "select max(points) from climber where country = \"United Kingdom\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The country contains values such as United Kingdom. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Return the maximum number of points for climbers from the United Kingdom.", "output": "select max(points) from climber where country = \"United Kingdom\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "How many distinct countries are the climbers from?", "output": "select count(distinct country) from climber"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Count the number of different countries that climbers are from.", "output": "select count(distinct country) from climber"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the names of mountains in ascending alphabetical order?", "output": "select name from mountain order by name asc"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Give the names of mountains in alphabetical order.", "output": "select name from mountain order by name asc"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the countries of mountains with height bigger than 5000?", "output": "select country from mountain where height > 5000"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Return the countries of the mountains that have a height larger than 5000.", "output": "select country from mountain where height > 5000"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What is the name of the highest mountain?", "output": "select name from mountain order by height desc limit 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Return the name of the mountain with the greatest height.", "output": "select name from mountain order by height desc limit 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "List the distinct ranges of the mountains with the top 3 prominence.", "output": "select distinct range from mountain order by prominence desc limit 3"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the different ranges of the 3 mountains with the highest prominence?", "output": "select distinct range from mountain order by prominence desc limit 3"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show names of climbers and the names of mountains they climb.", "output": "select t1.name, t2.name from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the names of climbers and the corresponding names of mountains that they climb?", "output": "select t1.name, t2.name from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show the names of climbers and the heights of mountains they climb.", "output": "select t1.name, t2.height from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the names of climbers and the corresponding heights of the mountains that they climb?", "output": "select t1.name, t2.height from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show the height of the mountain climbed by the climber with the maximum points.", "output": "select t2.height from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id order by t1.points desc limit 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What is the height of the mountain climbined by the climbing who had the most points?", "output": "select t2.height from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id order by t1.points desc limit 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The country contains values such as West Germany. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show the distinct names of mountains climbed by climbers from country \"West Germany\".", "output": "select distinct t2.name from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id where t1.country = \"West Germany\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The country contains values such as West Germany. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the different names of mountains ascended by climbers from the country of West Germany?", "output": "select distinct t2.name from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id where t1.country = \"West Germany\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. The country contains values such as Uganda. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show the times used by climbers to climb mountains in Country Uganda.", "output": "select t1.time from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id where t2.country = \"Uganda\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. The country contains values such as Uganda. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the times used by climbers who climbed mountains in the country of Uganda?", "output": "select t1.time from climber as t1 join mountain as t2 on t1.mountain_id = t2.mountain_id where t2.country = \"Uganda\""}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Please show the countries and the number of climbers from each country.", "output": "select country, count(*) from climber group by country"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "How many climbers are from each country?", "output": "select country, count(*) from climber group by country"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "List the countries that have more than one mountain.", "output": "select country from mountain group by country having count(*) > 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Which countries have more than one mountain?", "output": "select country from mountain group by country having count(*) > 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "List the names of mountains that do not have any climber.", "output": "select name from mountain where mountain_id not in (select mountain_id from climber)"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the names of countains that no climber has climbed?", "output": "select name from mountain where mountain_id not in (select mountain_id from climber)"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.", "output": "select country from mountain where height > 5600 intersect select country from mountain where height < 5200"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the countries that have both mountains that are higher than 5600 and lower than 5200?", "output": "select country from mountain where height > 5600 intersect select country from mountain where height < 5200"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show the range that has the most number of mountains.", "output": "select range from mountain group by range order by count(*) desc limit 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Which range contains the most mountains?", "output": "select range from mountain group by range order by count(*) desc limit 1"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "Show the names of mountains with height more than 5000 or prominence more than 1000.", "output": "select name from mountain where height > 5000 or prominence > 1000"}, {"instruction": "climbing contains tables such as mountain, climber. Table mountain has columns such as mountain_id, name, height, prominence, range, country. mountain_id is the primary key. Table climber has columns such as climber_id, name, country, time, points, mountain_id. climber_id is the primary key. The mountain_id of climber is the foreign key of mountain_id of mountain.", "input": "What are the names of mountains that have a height of over 5000 or a prominence of over 1000?", "output": "select name from mountain where height > 5000 or prominence > 1000"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "How many body builders are there?", "output": "select count(*) from body_builder"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "List the total scores of body builders in ascending order.", "output": "select total from body_builder order by total asc"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "List the snatch score and clean jerk score of body builders in ascending order of snatch score.", "output": "select snatch, clean_jerk from body_builder order by snatch asc"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What is the average snatch score of body builders?", "output": "select avg(snatch) from body_builder"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the clean and jerk score of the body builder with the highest total score?", "output": "select clean_jerk from body_builder order by total desc limit 1"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the birthdays of people in ascending order of height?", "output": "select birth_date from people order by height asc"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the names of body builders?", "output": "select t2.name from body_builder as t1 join people as t2 on t1.people_id = t2.people_id"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the names of body builders whose total score is higher than 300?", "output": "select t2.name from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t1.total > 300"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What is the name of the body builder with the greatest body weight?", "output": "select t2.name from body_builder as t1 join people as t2 on t1.people_id = t2.people_id order by t2.weight desc limit 1"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the birth date and birth place of the body builder with the highest total points?", "output": "select t2.birth_date, t2.birth_place from body_builder as t1 join people as t2 on t1.people_id = t2.people_id order by t1.total desc limit 1"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the heights of body builders with total score smaller than 315?", "output": "select t2.height from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t1.total < 315"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What is the average total score of body builders with height bigger than 200?", "output": "select avg(t1.total) from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t2.height > 200"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the names of body builders in descending order of total scores?", "output": "select t2.name from body_builder as t1 join people as t2 on t1.people_id = t2.people_id order by t1.total desc"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "List each birth place along with the number of people from there.", "output": "select birth_place, count(*) from people group by birth_place"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What is the most common birth place of people?", "output": "select birth_place from people group by birth_place order by count(*) desc limit 1"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the birth places that are shared by at least two people?", "output": "select birth_place from people group by birth_place having count(*) >= 2"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "List the height and weight of people in descending order of height.", "output": "select height, weight from people order by height desc"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "Show all information about each body builder.", "output": "select * from body_builder"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "List the names and origins of people who are not body builders.", "output": "select name, birth_place from people except select t1.name, t1.birth_place from people as t1 join body_builder as t2 on t1.people_id = t2.people_id"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "How many distinct birth places are there?", "output": "select count(distinct birth_place) from people"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "How many persons are not body builders?", "output": "select count(*) from people where people_id not in (select people_id from body_builder)"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.", "output": "select t2.weight from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t1.snatch > 140 or t2.height > 200;"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What are the total scores of the body builders whose birthday contains the string \"January\" ?", "output": "select t1.total from body_builder as t1 join people as t2 on t1.people_id = t2.people_id where t2.birth_date like \"%january%\";"}, {"instruction": "body_builder contains tables such as body_builder, people. Table body_builder has columns such as body_builder_id, people_id, snatch, clean_jerk, total. body_builder_id is the primary key. Table people has columns such as people_id, name, height, weight, birth_date, birth_place. people_id is the primary key. The people_id of body_builder is the foreign key of people_id of people.", "input": "What is the minimum snatch score?", "output": "select min(snatch) from body_builder"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "How many elections are there?", "output": "select count(*) from election"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "List the votes of elections in descending order.", "output": "select votes from election order by votes desc"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "List the dates and vote percents of elections.", "output": "select date, vote_percent from election"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the minimum and maximum vote percents of elections?", "output": "select min(vote_percent), max(vote_percent) from election"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the names and parties of representatives?", "output": "select name, party from representative"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The party contains values such as Republican. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the names of representatives whose party is not \"Republican\"?", "output": "select name from representative where party != \"Republican\""}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The state contains values such as New York, Indiana. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the life spans of representatives from New York state or Indiana state?", "output": "select lifespan from representative where state = \"New York\" or state = \"Indiana\""}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the names of representatives and the dates of elections they participated in.", "output": "select t2.name, t1.date from election as t1 join representative as t2 on t1.representative_id = t2.representative_id"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the names of representatives with more than 10000 votes in election?", "output": "select t2.name from election as t1 join representative as t2 on t1.representative_id = t2.representative_id where votes > 10000"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the names of representatives in descending order of votes?", "output": "select t2.name from election as t1 join representative as t2 on t1.representative_id = t2.representative_id order by votes desc"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What is the party of the representative that has the smallest number of votes.", "output": "select t2.party from election as t1 join representative as t2 on t1.representative_id = t2.representative_id order by votes asc limit 1"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the lifespans of representatives in descending order of vote percent?", "output": "select t2.lifespan from election as t1 join representative as t2 on t1.representative_id = t2.representative_id order by vote_percent desc"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The party contains values such as Republican. The representative_id of election is the foreign key of representative_id of representative.", "input": "What is the average number of votes of representatives from party \"Republican\"?", "output": "select avg(t1.votes) from election as t1 join representative as t2 on t1.representative_id = t2.representative_id where t2.party = \"Republican\""}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What are the different parties of representative? Show the party name and the number of representatives in each party.", "output": "select party, count(*) from representative group by party"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What is the party that has the largest number of representatives?", "output": "select party, count(*) from representative group by party order by count(*) desc limit 1"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What parties have at least three representatives?", "output": "select party from representative group by party having count(*) >= 3"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "What states have at least two representatives?", "output": "select state from representative group by state having count(*) >= 2"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "List the names of representatives that have not participated in elections listed here.", "output": "select name from representative where representative_id not in (select representative_id from election)"}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The state contains values such as Pennsylvania, New York. The representative_id of election is the foreign key of representative_id of representative.", "input": "Show the parties that have both representatives in New York state and representatives in Pennsylvania state.", "output": "select party from representative where state = \"New York\" intersect select party from representative where state = \"Pennsylvania\""}, {"instruction": "election_representative contains tables such as election, representative. Table election has columns such as election_id, representative_id, date, votes, vote_percent, seats, place. election_id is the primary key. Table representative has columns such as representative_id, name, state, party, lifespan. representative_id is the primary key. The representative_id of election is the foreign key of representative_id of representative.", "input": "How many distinct parties are there for representatives?", "output": "select count(distinct party) from representative"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "How many apartment bookings are there in total?", "output": "select count(*) from apartment_bookings"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Count the total number of apartment bookings.", "output": "select count(*) from apartment_bookings"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the start dates and end dates of all the apartment bookings.", "output": "select booking_start_date, booking_end_date from apartment_bookings"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the start date and end date of each apartment booking?", "output": "select booking_start_date, booking_end_date from apartment_bookings"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show all distinct building descriptions.", "output": "select distinct building_description from apartment_buildings"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Give me a list of all the distinct building descriptions.", "output": "select distinct building_description from apartment_buildings"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_manager contains values such as Emma. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the short names of the buildings managed by \"Emma\".", "output": "select building_short_name from apartment_buildings where building_manager = \"Emma\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_manager contains values such as Emma. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which buildings does \"Emma\" manage? Give me the short names of the buildings.", "output": "select building_short_name from apartment_buildings where building_manager = \"Emma\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_manager contains values such as Brenden. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the addresses and phones of all the buildings managed by \"Brenden\".", "output": "select building_address, building_phone from apartment_buildings where building_manager = \"Brenden\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_manager contains values such as Brenden. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the address and phone number of the buildings managed by \"Brenden\"?", "output": "select building_address, building_phone from apartment_buildings where building_manager = \"Brenden\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the building full names that contain the word \"court\"?", "output": "select building_full_name from apartment_buildings where building_full_name like \"%court%\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Find all the building full names containing the word \"court\".", "output": "select building_full_name from apartment_buildings where building_full_name like \"%court%\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What is the minimum and maximum number of bathrooms of all the apartments?", "output": "select min(bathroom_count), max(bathroom_count) from apartments"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Give me the minimum and maximum bathroom count among all the apartments.", "output": "select min(bathroom_count), max(bathroom_count) from apartments"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What is the average number of bedrooms of all apartments?", "output": "select avg(bedroom_count) from apartments"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Find the average number of bedrooms of all the apartments.", "output": "select avg(bedroom_count) from apartments"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return the apartment number and the number of rooms for each apartment.", "output": "select apt_number, room_count from apartments"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the apartment number and the room count of each apartment?", "output": "select apt_number, room_count from apartments"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_description contains values such as Studio. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_type_code contains values such as Studio. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What is the average number of rooms of apartments with type code \"Studio\"?", "output": "select avg(room_count) from apartments where apt_type_code = \"Studio\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_description contains values such as Studio. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_type_code contains values such as Studio. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Find the average room count of the apartments that have the \"Studio\" type code.", "output": "select avg(room_count) from apartments where apt_type_code = \"Studio\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_description contains values such as Flat. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_type_code contains values such as Flat. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return the apartment numbers of the apartments with type code \"Flat\".", "output": "select apt_number from apartments where apt_type_code = \"Flat\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_description contains values such as Flat. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_type_code contains values such as Flat. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which apartments have type code \"Flat\"? Give me their apartment numbers.", "output": "select apt_number from apartments where apt_type_code = \"Flat\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return the first names and last names of all guests", "output": "select guest_first_name, guest_last_name from guests"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the first names and last names of all the guests?", "output": "select guest_first_name, guest_last_name from guests"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. The gender_code contains values such as Male. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return the date of birth for all the guests with gender code \"Male\".", "output": "select date_of_birth from guests where gender_code = \"Male\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. The gender_code contains values such as Male. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are dates of birth of all the guests whose gender is \"Male\"?", "output": "select date_of_birth from guests where gender_code = \"Male\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the apartment numbers, start dates, and end dates of all the apartment bookings.", "output": "select t2.apt_number, t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the apartment number, start date, and end date of each apartment booking?", "output": "select t2.apt_number, t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_description contains values such as Duplex. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_type_code contains values such as Duplex. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the booking start and end dates of the apartments with type code \"Duplex\"?", "output": "select t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.apt_type_code = \"Duplex\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_description contains values such as Duplex. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_type_code contains values such as Duplex. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return the booking start date and end date for the apartments that have type code \"Duplex\".", "output": "select t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.apt_type_code = \"Duplex\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the booking start and end dates of the apartments with more than 2 bedrooms?", "output": "select t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.bedroom_count > 2"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Find the booking start date and end date for the apartments that have more than two bedrooms.", "output": "select t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.bedroom_count > 2"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_number contains values such as Suite 634, Suite 645. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What is the booking status code of the apartment with apartment number \"Suite 634\"?", "output": "select t1.booking_status_code from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.apt_number = \"Suite 634\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. The apt_number contains values such as Suite 634, Suite 645. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Tell me the booking status code for the apartment with number \"Suite 634\".", "output": "select t1.booking_status_code from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.apt_number = \"Suite 634\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Confirmed. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the distinct apartment numbers of the apartments that have bookings with status code \"Confirmed\".", "output": "select distinct t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Confirmed\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Confirmed. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which apartments have bookings with status code \"Confirmed\"? Return their apartment numbers.", "output": "select distinct t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Confirmed\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Provisional. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the average room count of the apartments that have booking status code \"Provisional\".", "output": "select avg(room_count) from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Provisional\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Provisional. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What is the average room count of the apartments whose booking status code is \"Provisional\"?", "output": "select avg(room_count) from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Provisional\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the guest first names, start dates, and end dates of all the apartment bookings.", "output": "select t2.guest_first_name, t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join guests as t2 on t1.guest_id = t2.guest_id"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the guest first name, start date, and end date of each apartment booking?", "output": "select t2.guest_first_name, t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join guests as t2 on t1.guest_id = t2.guest_id"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. The gender_code contains values such as Female. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the start dates and end dates of all the apartment bookings made by guests with gender code \"Female\".", "output": "select t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join guests as t2 on t1.guest_id = t2.guest_id where t2.gender_code = \"Female\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. The gender_code contains values such as Female. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the start date and end date of the apartment bookings made by female guests (gender code \"Female\")?", "output": "select t1.booking_start_date, t1.booking_start_date from apartment_bookings as t1 join guests as t2 on t1.guest_id = t2.guest_id where t2.gender_code = \"Female\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Confirmed. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the first names and last names of all the guests that have apartment bookings with status code \"Confirmed\".", "output": "select t2.guest_first_name, t2.guest_last_name from apartment_bookings as t1 join guests as t2 on t1.guest_id = t2.guest_id where t1.booking_status_code = \"Confirmed\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Confirmed. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which guests have apartment bookings with status code \"Confirmed\"? Return their first names and last names.", "output": "select t2.guest_first_name, t2.guest_last_name from apartment_bookings as t1 join guests as t2 on t1.guest_id = t2.guest_id where t1.booking_status_code = \"Confirmed\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the facility codes of apartments with more than 4 bedrooms.", "output": "select t1.facility_code from apartment_facilities as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.bedroom_count > 4"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the facility codes of the apartments with more than four bedrooms?", "output": "select t1.facility_code from apartment_facilities as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t2.bedroom_count > 4"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. The facility_code contains values such as Gym. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the total number of rooms of all apartments with facility code \"Gym\".", "output": "select sum(t2.room_count) from apartment_facilities as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.facility_code = \"Gym\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. The facility_code contains values such as Gym. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Find the total number of rooms in the apartments that have facility code \"Gym\".", "output": "select sum(t2.room_count) from apartment_facilities as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.facility_code = \"Gym\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_short_name contains values such as Columbus Square.The building_full_name contains values such as Columbus Square. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the total number of rooms of the apartments in the building with short name \"Columbus Square\".", "output": "select sum(t2.room_count) from apartment_buildings as t1 join apartments as t2 on t1.building_id = t2.building_id where t1.building_short_name = \"Columbus Square\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_short_name contains values such as Columbus Square.The building_full_name contains values such as Columbus Square. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "How many rooms in total are there in the apartments in the building with short name \"Columbus Square\"?", "output": "select sum(t2.room_count) from apartment_buildings as t1 join apartments as t2 on t1.building_id = t2.building_id where t1.building_short_name = \"Columbus Square\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the addresses of the buildings that have apartments with more than 2 bathrooms.", "output": "select t1.building_address from apartment_buildings as t1 join apartments as t2 on t1.building_id = t2.building_id where t2.bathroom_count > 2"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.", "output": "select t1.building_address from apartment_buildings as t1 join apartments as t2 on t1.building_id = t2.building_id where t2.bathroom_count > 2"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_manager contains values such as Kyle. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the apartment type codes and apartment numbers in the buildings managed by \"Kyle\".", "output": "select t2.apt_type_code, t2.apt_number from apartment_buildings as t1 join apartments as t2 on t1.building_id = t2.building_id where t1.building_manager = \"Kyle\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. The building_manager contains values such as Kyle. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What apartment type codes and apartment numbers do the buildings managed by \"Kyle\" have?", "output": "select t2.apt_type_code, t2.apt_number from apartment_buildings as t1 join apartments as t2 on t1.building_id = t2.building_id where t1.building_manager = \"Kyle\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the booking status code and the corresponding number of bookings.", "output": "select booking_status_code, count(*) from apartment_bookings group by booking_status_code"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "How many bookings does each booking status have? List the booking status code and the number of corresponding bookings.", "output": "select booking_status_code, count(*) from apartment_bookings group by booking_status_code"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return all the apartment numbers sorted by the room count in ascending order.", "output": "select apt_number from apartments order by room_count asc"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Sort the apartment numbers in ascending order of room count.", "output": "select apt_number from apartments order by room_count asc"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return the apartment number with the largest number of bedrooms.", "output": "select apt_number from apartments order by bedroom_count desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What is the apartment number of the apartment with the most beds?", "output": "select apt_number from apartments order by bedroom_count desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the apartment type codes and the corresponding number of apartments sorted by the number of apartments in ascending order.", "output": "select apt_type_code, count(*) from apartments group by apt_type_code order by count(*) asc"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return each apartment type code with the number of apartments having that apartment type, in ascending order of the number of apartments.", "output": "select apt_type_code, count(*) from apartments group by apt_type_code order by count(*) asc"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the top 3 apartment type codes sorted by the average number of rooms in descending order.", "output": "select apt_type_code from apartments group by apt_type_code order by avg(room_count) desc limit 3"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "What are the top three apartment types in terms of the average room count? Give me the", "output": "select apt_type_code from apartments group by apt_type_code order by avg(room_count) desc limit 3"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the apartment type code that has the largest number of total rooms, together with the number of bathrooms and number of bedrooms.", "output": "select apt_type_code, bathroom_count, bedroom_count from apartments group by apt_type_code order by sum(room_count) desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which apartment type has the largest number of total rooms? Return the apartment type code, its number of bathrooms and number of bedrooms.", "output": "select apt_type_code, bathroom_count, bedroom_count from apartments group by apt_type_code order by sum(room_count) desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the most common apartment type code.", "output": "select apt_type_code from apartments group by apt_type_code order by count(*) desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which apartment type code appears the most often?", "output": "select apt_type_code from apartments group by apt_type_code order by count(*) desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the most common apartment type code among apartments with more than 1 bathroom.", "output": "select apt_type_code from apartments where bathroom_count > 1 group by apt_type_code order by count(*) desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which apartment type code is the most common among apartments with more than one bathroom?", "output": "select apt_type_code from apartments where bathroom_count > 1 group by apt_type_code order by count(*) desc limit 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show each apartment type code, and the maximum and minimum number of rooms for each type.", "output": "select apt_type_code, max(room_count), min(room_count) from apartments group by apt_type_code"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Return each apartment type code along with the maximum and minimum number of rooms among each type.", "output": "select apt_type_code, max(room_count), min(room_count) from apartments group by apt_type_code"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show each gender code and the corresponding count of guests sorted by the count in descending order.", "output": "select gender_code, count(*) from guests group by gender_code order by count(*) desc"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.", "output": "select gender_code, count(*) from guests group by gender_code order by count(*) desc"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "How many apartments do not have any facility?", "output": "select count(*) from apartments where apt_id not in (select apt_id from apartment_facilities)"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Find the number of apartments that have no facility.", "output": "select count(*) from apartments where apt_id not in (select apt_id from apartment_facilities)"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Provisional, Confirmed. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the apartment numbers of apartments with bookings that have status code both \"Provisional\" and \"Confirmed\"", "output": "select t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Confirmed\" intersect select t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Provisional\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. The booking_status_code contains values such as Provisional, Confirmed. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which apartments have bookings with both status codes \"Provisional\" and \"Confirmed\"? Give me the apartment numbers.", "output": "select t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Confirmed\" intersect select t2.apt_number from apartment_bookings as t1 join apartments as t2 on t1.apt_id = t2.apt_id where t1.booking_status_code = \"Provisional\""}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Show the apartment numbers of apartments with unit status availability of both 0 and 1.", "output": "select t1.apt_number from apartments as t1 join view_unit_status as t2 on t1.apt_id = t2.apt_id where t2.available_yn = 0 intersect select t1.apt_number from apartments as t1 join view_unit_status as t2 on t1.apt_id = t2.apt_id where t2.available_yn = 1"}, {"instruction": "apartment_rentals contains tables such as apartment_buildings, apartments, apartment_facilities, guests, apartment_bookings, view_unit_status. Table apartment_buildings has columns such as building_id, building_short_name, building_full_name, building_description, building_address, building_manager, building_phone. building_id is the primary key. Table apartments has columns such as apt_id, building_id, apt_type_code, apt_number, bathroom_count, bedroom_count, room_count. apt_id is the primary key. Table apartment_facilities has columns such as apt_id, facility_code. apt_id is the primary key. Table guests has columns such as guest_id, gender_code, guest_first_name, guest_last_name, date_of_birth. guest_id is the primary key. Table apartment_bookings has columns such as apt_booking_id, apt_id, guest_id, booking_status_code, booking_start_date, booking_end_date. apt_booking_id is the primary key. Table view_unit_status has columns such as apt_id, apt_booking_id, status_date, available_yn. status_date is the primary key. The building_id of apartments is the foreign key of building_id of apartment_buildings. The apt_id of apartment_facilities is the foreign key of apt_id of apartments. The guest_id of apartment_bookings is the foreign key of guest_id of guests. The apt_id of apartment_bookings is the foreign key of apt_id of apartments. The apt_booking_id of view_unit_status is the foreign key of apt_booking_id of apartment_bookings. The apt_id of view_unit_status is the foreign key of apt_id of apartments.", "input": "Which apartments have unit status availability of both 0 and 1? Return their apartment numbers.", "output": "select t1.apt_number from apartments as t1 join view_unit_status as t2 on t1.apt_id = t2.apt_id where t2.available_yn = 0 intersect select t1.apt_number from apartments as t1 join view_unit_status as t2 on t1.apt_id = t2.apt_id where t2.available_yn = 1"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "How many games are held after season 2007?", "output": "select count(*) from game where season > 2007"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "List the dates of games by the home team name in descending order.", "output": "select date from game order by home_team desc"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "List the season, home team, away team of all the games.", "output": "select season, home_team, away_team from game"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "What are the maximum, minimum and average home games each stadium held?", "output": "select max(home_games), min(home_games), avg(home_games) from stadium"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "What is the average attendance of stadiums with capacity percentage higher than 100%?", "output": "select average_attendance from stadium where capacity_percentage > 100"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The injury contains values such as Knee problem. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "What are the player name, number of matches, and information source for players who do not suffer from injury of 'Knee problem'?", "output": "select player, number_of_matches, source from injury_accident where injury != 'Knee problem'"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The player contains values such as Walter Samuel. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "What is the season of the game which causes the player 'Walter Samuel' to get injured?", "output": "select t1.season from game as t1 join injury_accident as t2 on t1.id = t2.game_id where t2.player = 'Walter Samuel'"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "What are the ids, scores, and dates of the games which caused at least two injury accidents?", "output": "select t1.id, t1.score, t1.date from game as t1 join injury_accident as t2 on t2.game_id = t1.id group by t1.id having count(*) >= 2"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "What are the id and name of the stadium where the most injury accidents happened?", "output": "select t1.id, t1.name from stadium as t1 join game as t2 on t1.id = t2.stadium_id join injury_accident as t3 on t2.id = t3.game_id group by t1.id order by count(*) desc limit 1"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "Find the id and name of the stadium where the largest number of injury accidents occurred.", "output": "select t1.id, t1.name from stadium as t1 join game as t2 on t1.id = t2.stadium_id join injury_accident as t3 on t2.id = t3.game_id group by t1.id order by count(*) desc limit 1"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The injury contains values such as Knee problem, Foot injury. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "In which season and which stadium did any player have an injury of 'Foot injury' or 'Knee problem'?", "output": "select t1.season, t2.name from game as t1 join stadium as t2 on t1.stadium_id = t2.id join injury_accident as t3 on t1.id = t3.game_id where t3.injury = 'Foot injury' or t3.injury = 'Knee problem'"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "How many different kinds of information sources are there for injury accidents?", "output": "select count(distinct source) from injury_accident"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "How many games are free of injury accidents?", "output": "select count(*) from game where id not in ( select game_id from injury_accident )"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "How many distinct kinds of injuries happened after season 2010?", "output": "select count(distinct t1.injury) from injury_accident as t1 join game as t2 on t1.game_id = t2.id where t2.season > 2010"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The player contains values such as Walter Samuel, Thiago Motta. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "List the name of the stadium where both the player 'Walter Samuel' and the player 'Thiago Motta' got injured.", "output": "select t2.name from game as t1 join stadium as t2 on t1.stadium_id = t2.id join injury_accident as t3 on t1.id = t3.game_id where t3.player = 'Walter Samuel' intersect select t2.name from game as t1 join stadium as t2 on t1.stadium_id = t2.id join injury_accident as t3 on t1.id = t3.game_id where t3.player = 'Thiago Motta'"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "Show the name, average attendance, total attendance for stadiums where no accidents happened.", "output": "select name, average_attendance, total_attendance from stadium except select t2.name, t2.average_attendance, t2.total_attendance from game as t1 join stadium as t2 on t1.stadium_id = t2.id join injury_accident as t3 on t1.id = t3.game_id"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "Which stadium name contains the substring \"Bank\"?", "output": "select name from stadium where name like \"%bank%\""}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "How many games has each stadium held?", "output": "select t1.id, count(*) from stadium as t1 join game as t2 on t1.id = t2.stadium_id group by t1.id"}, {"instruction": "game_injury contains tables such as stadium, game, injury_accident. Table stadium has columns such as id, name, home_games, average_attendance, total_attendance, capacity_percentage. id is the primary key. Table game has columns such as stadium_id, id, season, date, home_team, away_team, score, competition. id is the primary key. Table injury_accident has columns such as game_id, id, player, injury, number_of_matches, source. id is the primary key. The stadium_id of game is the foreign key of id of stadium. The game_id of injury_accident is the foreign key of id of game.", "input": "For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season.", "output": "select t1.date, t2.player from game as t1 join injury_accident as t2 on t1.id = t2.game_id order by t1.season desc"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "List all country and league names.", "output": "select t1.name, t2.name from country as t1 join league as t2 on t1.id = t2.country_id"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. The name contains values such as England. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "How many leagues are there in England?", "output": "select count(*) from country as t1 join league as t2 on t1.id = t2.country_id where t1.name = \"England\""}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "What is the average weight of all players?", "output": "select avg(weight) from player"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "What is the maximum and minimum height of all players?", "output": "select max(weight), min(weight) from player"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "List all player names who have an overall rating higher than the average.", "output": "select distinct t1.player_name from player as t1 join player_attributes as t2 on t1.player_api_id = t2.player_api_id where t2.overall_rating > ( select avg(overall_rating) from player_attributes )"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "What are the names of players who have the best dribbling?", "output": "select distinct t1.player_name from player as t1 join player_attributes as t2 on t1.player_api_id = t2.player_api_id where t2.dribbling = ( select max(overall_rating) from player_attributes)"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "List the names of all players who have a crossing score higher than 90 and prefer their right foot.", "output": "select distinct t1.player_name from player as t1 join player_attributes as t2 on t1.player_api_id = t2.player_api_id where t2.crossing > 90 and t2.preferred_foot = \"right\""}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "List the names of all left-footed players who have overall rating between 85 and 90.", "output": "select distinct t1.player_name from player as t1 join player_attributes as t2 on t1.player_api_id = t2.player_api_id where t2.preferred_foot = \"left\" and t2.overall_rating >= 85 and t2.overall_rating <= 90"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "What is the average rating for right-footed players and left-footed players?", "output": "select preferred_foot, avg(overall_rating) from player_attributes group by preferred_foot"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "Of all players with an overall rating greater than 80, how many are right-footed and left-footed?", "output": "select preferred_foot, count(*) from player_attributes where overall_rating > 80 group by preferred_foot"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "List all of the player ids with a height of at least 180cm and an overall rating higher than 85.", "output": "select player_api_id from player where height >= 180 intersect select player_api_id from player_attributes where overall_rating > 85"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "List all of the ids for left-footed players with a height between 180cm and 190cm.", "output": "select player_api_id from player where height >= 180 and height <= 190 intersect select player_api_id from player_attributes where preferred_foot = \"left\""}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "Who are the top 3 players in terms of overall rating?", "output": "select distinct t1.player_name from player as t1 join player_attributes as t2 on t1.player_api_id = t2.player_api_id order by overall_rating desc limit 3"}, {"instruction": "soccer_1 contains tables such as player_attributes, sqlite_sequence, player, league, country, team, team_attributes. Table player_attributes has columns such as id, player_fifa_api_id, player_api_id, date, overall_rating, potential, preferred_foot, attacking_work_rate, defensive_work_rate, crossing, finishing, heading_accuracy, short_passing, volleys, dribbling, curve, free_kick_accuracy, long_passing, ball_control, acceleration, sprint_speed, agility, reactions, balance, shot_power, jumping, stamina, strength, long_shots, aggression, interceptions, positioning, vision, penalties, marking, standing_tackle, sliding_tackle, gk_diving, gk_handling, gk_kicking, gk_positioning, gk_reflexes. id is the primary key. Table sqlite_sequence has columns such as name, seq. is the primary key. Table player has columns such as id, player_api_id, player_name, player_fifa_api_id, birthday, height, weight. id is the primary key. Table league has columns such as id, country_id, name. id is the primary key. Table country has columns such as id, name. id is the primary key. Table team has columns such as id, team_api_id, team_fifa_api_id, team_long_name, team_short_name. id is the primary key. Table team_attributes has columns such as id, team_fifa_api_id, team_api_id, date, buildupplayspeed, buildupplayspeedclass, buildupplaydribbling, buildupplaydribblingclass, buildupplaypassing, buildupplaypassingclass, buildupplaypositioningclass, chancecreationpassing, chancecreationpassingclass, chancecreationcrossing, chancecreationcrossingclass, chancecreationshooting, chancecreationshootingclass, chancecreationpositioningclass, defencepressure, defencepressureclass, defenceaggression, defenceaggressionclass, defenceteamwidth, defenceteamwidthclass, defencedefenderlineclass. id is the primary key. The player_api_id of player_attributes is the foreign key of player_api_id of player. The player_fifa_api_id of player_attributes is the foreign key of player_fifa_api_id of player. The country_id of league is the foreign key of id of country. The team_api_id of team_attributes is the foreign key of team_api_id of team. The team_fifa_api_id of team_attributes is the foreign key of team_fifa_api_id of team.", "input": "List the names and birthdays of the top five players in terms of potential.", "output": "select distinct t1.player_name, t1.birthday from player as t1 join player_attributes as t2 on t1.player_api_id = t2.player_api_id order by potential desc limit 5"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "How many performances are there?", "output": "select count(*) from performance"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "List the hosts of performances in ascending order of attendance.", "output": "select host from performance order by attendance asc"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "What are the dates and locations of performances?", "output": "select date, location from performance"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. The location contains values such as Bell Centre, TD Garden. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the attendances of the performances at location \"TD Garden\" or \"Bell Centre\"", "output": "select attendance from performance where location = \"TD Garden\" or location = \"Bell Centre\""}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "What is the average number of attendees for performances?", "output": "select avg(attendance) from performance"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "What is the date of the performance with the highest number of attendees?", "output": "select date from performance order by attendance desc limit 1"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show different locations and the number of performances at each location.", "output": "select location, count(*) from performance group by location"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the most common location of performances.", "output": "select location from performance group by location order by count(*) desc limit 1"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the locations that have at least two performances.", "output": "select location from performance group by location having count(*) >= 2"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the locations that have both performances with more than 2000 attendees and performances with less than 1000 attendees.", "output": "select location from performance where attendance > 2000 intersect select location from performance where attendance < 1000"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the names of members and the location of the performances they attended.", "output": "select t2.name, t3.location from member_attendance as t1 join member as t2 on t1.member_id = t2.member_id join performance as t3 on t1.performance_id = t3.performance_id"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the names of members and the location of performances they attended in ascending alphabetical order of their names.", "output": "select t2.name, t3.location from member_attendance as t1 join member as t2 on t1.member_id = t2.member_id join performance as t3 on t1.performance_id = t3.performance_id order by t2.name asc"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. The role contains values such as Violin. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the dates of performances with attending members whose roles are \"Violin\".", "output": "select t3.date from member_attendance as t1 join member as t2 on t1.member_id = t2.member_id join performance as t3 on t1.performance_id = t3.performance_id where t2.role = \"Violin\""}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "Show the names of members and the dates of performances they attended in descending order of attendance of the performances.", "output": "select t2.name, t3.date from member_attendance as t1 join member as t2 on t1.member_id = t2.member_id join performance as t3 on t1.performance_id = t3.performance_id order by t3.attendance desc"}, {"instruction": "performance_attendance contains tables such as member, performance, member_attendance. Table member has columns such as member_id, name, nationality, role. member_id is the primary key. Table performance has columns such as performance_id, date, host, location, attendance. performance_id is the primary key. Table member_attendance has columns such as member_id, performance_id, num_of_pieces. member_id is the primary key. The performance_id of member_attendance is the foreign key of performance_id of performance. The member_id of member_attendance is the foreign key of member_id of member.", "input": "List the names of members who did not attend any performance.", "output": "select name from member where member_id not in (select member_id from member_attendance)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the buildings which have rooms with capacity more than 50.", "output": "select distinct building from classroom where capacity > 50"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the distinct buildings with capacities of greater than 50?", "output": "select distinct building from classroom where capacity > 50"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Lamberton. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Lamberton. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The building contains values such as Lamberton. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of rooms that are not in the Lamberton building.", "output": "select count(*) from classroom where building != 'Lamberton'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Lamberton. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Lamberton. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The building contains values such as Lamberton. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many classrooms are not in Lamberton?", "output": "select count(*) from classroom where building != 'Lamberton'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the name and building of the departments whose budget is more than the average budget?", "output": "select dept_name, building from department where budget > (select avg(budget) from department)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the name and building of the departments with greater than average budget.", "output": "select dept_name, building from department where budget > (select avg(budget) from department)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the room number of the rooms which can sit 50 to 100 students and their buildings.", "output": "select building, room_number from classroom where capacity between 50 and 100"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?", "output": "select building, room_number from classroom where capacity between 50 and 100"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name and building of the department with the highest budget.", "output": "select dept_name, building from department order by budget desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the department name and corresponding building for the department with the greatest budget?", "output": "select dept_name, building from department order by budget desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as History. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as History. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as History. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the name of the student who has the highest total credits in the History department.", "output": "select name from student where dept_name = 'History' order by tot_cred desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as History. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as History. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as History. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the name of the student in the History department with the most credits.", "output": "select name from student where dept_name = 'History' order by tot_cred desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Lamberton. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Lamberton. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The building contains values such as Lamberton. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many rooms does the Lamberton building have?", "output": "select count(*) from classroom where building = 'Lamberton'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Lamberton. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Lamberton. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The building contains values such as Lamberton. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of classrooms in Lamberton.", "output": "select count(*) from classroom where building = 'Lamberton'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many students have advisors?", "output": "select count(distinct s_id) from advisor"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of students who have advisors.", "output": "select count(distinct s_id) from advisor"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many departments offer courses?", "output": "select count(distinct dept_name) from course"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of departments which offer courses.", "output": "select count(distinct dept_name) from course"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Physics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Physics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Physics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Physics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many different courses offered by Physics department?", "output": "select count(distinct course_id) from course where dept_name = 'Physics'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Physics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Physics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Physics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Physics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of courses in the Physics department.", "output": "select count(distinct course_id) from course where dept_name = 'Physics'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the title of courses that have two prerequisites?", "output": "select t1.title from course as t1 join prereq as t2 on t1.course_id = t2.course_id group by t2.course_id having count(*) = 2"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the titles for courses with two prerequisites?", "output": "select t1.title from course as t1 join prereq as t2 on t1.course_id = t2.course_id group by t2.course_id having count(*) = 2"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the title, credit, and department name of courses that have more than one prerequisites?", "output": "select t1.title, t1.credits, t1.dept_name from course as t1 join prereq as t2 on t1.course_id = t2.course_id group by t2.course_id having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the title, credit value, and department name for courses with more than one prerequisite?", "output": "select t1.title, t1.credits, t1.dept_name from course as t1 join prereq as t2 on t1.course_id = t2.course_id group by t2.course_id having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many courses that do not have prerequisite?", "output": "select count(*) from course where course_id not in (select course_id from prereq)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of courses without prerequisites.", "output": "select count(*) from course where course_id not in (select course_id from prereq)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of the courses that do not have any prerequisite?", "output": "select title from course where course_id not in (select course_id from prereq)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the titles of courses without prerequisites?", "output": "select title from course where course_id not in (select course_id from prereq)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many different instructors have taught some course?", "output": "select count (distinct id) from teaches"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of distinct instructors who have taught a course.", "output": "select count (distinct id) from teaches"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Marketing, Finance. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Marketing, Finance. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Finance, Marketing. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Finance.The dept_name contains values such as Marketing, Finance. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the total budgets of the Marketing or Finance department.", "output": "select sum(budget) from department where dept_name = 'Marketing' or dept_name = 'Finance'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Marketing, Finance. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Marketing, Finance. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Finance, Marketing. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Finance.The dept_name contains values such as Marketing, Finance. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the sum of budgets of the Marketing and Finance departments?", "output": "select sum(budget) from department where dept_name = 'Marketing' or dept_name = 'Finance'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the department name of the instructor whose name contains 'Soisalon'.", "output": "select dept_name from instructor where name like '%soisalon%'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the name of the department with an instructure who has a name like 'Soisalon'?", "output": "select dept_name from instructor where name like '%soisalon%'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Lamberton. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Lamberton. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The building contains values such as Lamberton. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many rooms whose capacity is less than 50 does the Lamberton building have?", "output": "select count(*) from classroom where building = 'Lamberton' and capacity < 50"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Lamberton. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Lamberton. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The building contains values such as Lamberton. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Count the number of rooms in Lamberton with capacity lower than 50.", "output": "select count(*) from classroom where building = 'Lamberton' and capacity < 50"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name and budget of departments whose budgets are more than the average budget.", "output": "select dept_name, budget from department where budget > (select avg(budget) from department)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names and budgets of departments with budgets greater than the average?", "output": "select dept_name, budget from department where budget > (select avg(budget) from department)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "what is the name of the instructor who is in Statistics department and earns the lowest salary?", "output": "select name from instructor where dept_name = 'Statistics' order by salary limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the name of the lowest earning instructor in the Statistics department.", "output": "select name from instructor where dept_name = 'Statistics' order by salary limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics, Psychology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics, Psychology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the title of course that is provided by both Statistics and Psychology departments.", "output": "select title from course where dept_name = 'Statistics' intersect select title from course where dept_name = 'Psychology'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics, Psychology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics, Psychology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the title of a course that is listed in both the Statistics and Psychology departments?", "output": "select title from course where dept_name = 'Statistics' intersect select title from course where dept_name = 'Psychology'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics, Psychology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics, Psychology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the title of course that is provided by Statistics but not Psychology departments.", "output": "select title from course where dept_name = 'Statistics' except select title from course where dept_name = 'Psychology'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics, Psychology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics, Psychology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics, Psychology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the titles of courses that are in the Statistics department but not the Psychology department?", "output": "select title from course where dept_name = 'Statistics' except select title from course where dept_name = 'Psychology'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.", "output": "select id from teaches where semester = 'Fall' and year = 2009 except select id from teaches where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?", "output": "select id from teaches where semester = 'Fall' and year = 2009 except select id from teaches where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of students who took any class in the years of 2009 and 2010.", "output": "select distinct t1.name from student as t1 join takes as t2 on t1.id = t2.id where year = 2009 or year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of the students who took classes in 2009 or 2010?", "output": "select distinct t1.name from student as t1 join takes as t2 on t1.id = t2.id where year = 2009 or year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of the top 3 departments that provide the largest amount of courses?", "output": "select dept_name from course group by dept_name order by count(*) desc limit 3"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of the 3 departments with the most courses?", "output": "select dept_name from course group by dept_name order by count(*) desc limit 3"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of the department that offers the highest total credits?", "output": "select dept_name from course group by dept_name order by sum(credits) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the name of the department with the most credits?", "output": "select dept_name from course group by dept_name order by sum(credits) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "List the names of all courses ordered by their titles and credits.", "output": "select title from course order by title, credits"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Given the titles of all courses, in order of titles and credits.", "output": "select title from course order by title, credits"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Which department has the lowest budget?", "output": "select dept_name from department order by budget limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the name of the department with the lowest budget.", "output": "select dept_name from department order by budget limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "List the names and buildings of all departments sorted by the budget from large to small.", "output": "select dept_name, building from department order by budget desc"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names and buildings of the deparments, sorted by budget descending?", "output": "select dept_name, building from department order by budget desc"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Who is the instructor with the highest salary?", "output": "select name from instructor order by salary desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the name of the highest paid instructor.", "output": "select name from instructor order by salary desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "List the information of all instructors ordered by their salary in ascending order.", "output": "select * from instructor order by salary"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give all information regarding instructors, in order of salary from least to greatest.", "output": "select * from instructor order by salary"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of the students and their department names sorted by their total credits in ascending order.", "output": "select name, dept_name from student order by tot_cred"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of students and their respective departments, ordered by number of credits from least to greatest?", "output": "select name, dept_name from student order by tot_cred"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "list in alphabetic order all course names and their instructors' names in year 2008.", "output": "select t1.title, t3.name from course as t1 join teaches as t2 on t1.course_id = t2.course_id join instructor as t3 on t2.id = t3.id where year = 2008 order by t1.title"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Show all titles and their instructors' names for courses in 2008, in alphabetical order by title.", "output": "select t1.title, t3.name from course as t1 join teaches as t2 on t1.course_id = t2.course_id join instructor as t3 on t2.id = t3.id where year = 2008 order by t1.title"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of instructors who are advising more than one student.", "output": "select t1.name from instructor as t1 join advisor as t2 on t1.id = t2.i_id group by t2.i_id having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of instructors who advise more than one student?", "output": "select t1.name from instructor as t1 join advisor as t2 on t1.id = t2.i_id group by t2.i_id having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of the students who have more than one advisor?", "output": "select t1.name from student as t1 join advisor as t2 on t1.id = t2.s_id group by t2.s_id having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of students who have more than one advisor?", "output": "select t1.name from student as t1 join advisor as t2 on t1.id = t2.s_id group by t2.s_id having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the number of rooms with more than 50 capacity for each building.", "output": "select count(*), building from classroom where capacity > 50 group by building"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many rooms in each building have a capacity of over 50?", "output": "select count(*), building from classroom where capacity > 50 group by building"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the maximum and average capacity among rooms in each building.", "output": "select max(capacity), avg(capacity), building from classroom group by building"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the greatest and average capacity for rooms in each building?", "output": "select max(capacity), avg(capacity), building from classroom group by building"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the title of the course that is offered by more than one department.", "output": "select title from course group by title having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the titles of courses that are offered in more than one department?", "output": "select title from course group by title having count(*) > 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the total credits of courses provided by different department.", "output": "select sum(credits), dept_name from course group by dept_name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many total credits are offered by each department?", "output": "select sum(credits), dept_name from course group by dept_name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the minimum salary for the departments whose average salary is above the average payment of all instructors.", "output": "select min(salary), dept_name from instructor group by dept_name having avg(salary) > (select avg(salary) from instructor)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the lowest salary in departments with average salary greater than the overall average.", "output": "select min(salary), dept_name from instructor group by dept_name having avg(salary) > (select avg(salary) from instructor)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the number of courses provided in each semester and year.", "output": "select count(*), semester, year from section group by semester, year"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many courses are provided in each semester and year?", "output": "select count(*), semester, year from section group by semester, year"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the year which offers the largest number of courses.", "output": "select year from section group by year order by count(*) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Which year had the greatest number of courses?", "output": "select year from section group by year order by count(*) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the year and semester when offers the largest number of courses.", "output": "select semester, year from section group by semester, year order by count(*) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the year and semester with the most courses?", "output": "select semester, year from section group by semester, year order by count(*) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of department has the highest amount of students?", "output": "select dept_name from student group by dept_name order by count(*) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the name of the deparment with the highest enrollment?", "output": "select dept_name from student group by dept_name order by count(*) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the total number of students in each department.", "output": "select count(*), dept_name from student group by dept_name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many students are in each department?", "output": "select count(*), dept_name from student group by dept_name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the semester and year which has the least number of student taking any class.", "output": "select semester, year from takes group by semester, year order by count(*) limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Which semeseter and year had the fewest students?", "output": "select semester, year from takes group by semester, year order by count(*) limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as History. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as History. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as History. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the id of the instructor who advises of all students from History department?", "output": "select i_id from advisor as t1 join student as t2 on t1.s_id = t2.id where t2.dept_name = 'History'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as History. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as History. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as History. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give id of the instructor who advises students in the History department.", "output": "select i_id from advisor as t1 join student as t2 on t1.s_id = t2.id where t2.dept_name = 'History'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as History. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as History. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as History. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name and salary of the instructors who are advisors of any student from History department?", "output": "select t2.name, t2.salary from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'History'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as History. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as History. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as History. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names and salaries of instructors who advises students in the History department?", "output": "select t2.name, t2.salary from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'History'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the id of the courses that do not have any prerequisite?", "output": "select course_id from course except select course_id from prereq"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the ids of courses without prerequisites?", "output": "select course_id from course except select course_id from prereq"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of the courses that do not have any prerequisite?", "output": "select title from course where course_id not in (select course_id from prereq)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of courses without prerequisites?", "output": "select title from course where course_id not in (select course_id from prereq)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Finance. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as International Finance.The dept_name contains values such as Finance. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Finance. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Finance.The dept_name contains values such as Finance. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the title of the prerequisite class of International Finance course?", "output": "select title from course where course_id in (select t1.prereq_id from prereq as t1 join course as t2 on t1.course_id = t2.course_id where t2.title = 'International Finance')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Finance. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as International Finance.The dept_name contains values such as Finance. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Finance. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Finance.The dept_name contains values such as Finance. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the title of the prerequisite to the course International Finance.", "output": "select title from course where course_id in (select t1.prereq_id from prereq as t1 join course as t2 on t1.course_id = t2.course_id where t2.title = 'International Finance')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as Differential Geometry. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the title of course whose prerequisite is course Differential Geometry.", "output": "select title from course where course_id in (select t1.course_id from prereq as t1 join course as t2 on t1.prereq_id = t2.course_id where t2.title = 'Differential Geometry')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as Differential Geometry. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the title of the course with Differential Geometry as a prerequisite?", "output": "select title from course where course_id in (select t1.course_id from prereq as t1 join course as t2 on t1.prereq_id = t2.course_id where t2.title = 'Differential Geometry')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of students who have taken any course in the fall semester of year 2003.", "output": "select name from student where id in (select id from takes where semester = 'Fall' and year = 2003)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of students who took a course in the Fall of 2003?", "output": "select name from student where id in (select id from takes where semester = 'Fall' and year = 2003)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Chandler. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Chandler. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Fall.The building contains values such as Chandler. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?", "output": "select t1.title from course as t1 join section as t2 on t1.course_id = t2.course_id where building = 'Chandler' and semester = 'Fall' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. The building contains values such as Chandler. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The building contains values such as Chandler. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Fall.The building contains values such as Chandler. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the title of the course offered in Chandler during the Fall of 2010.", "output": "select t1.title from course as t1 join section as t2 on t1.course_id = t2.course_id where building = 'Chandler' and semester = 'Fall' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of the instructors who taught C Programming course before.", "output": "select t1.name from instructor as t1 join teaches as t2 on t1.id = t2.id join course as t3 on t2.course_id = t3.course_id where t3.title = 'C Programming'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of instructors who have taught C Programming courses?", "output": "select t1.name from instructor as t1 join teaches as t2 on t1.id = t2.id join course as t3 on t2.course_id = t3.course_id where t3.title = 'C Programming'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Math. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Math. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Math. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name and salary of instructors who are advisors of the students from the Math department.", "output": "select t2.name, t2.salary from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'Math'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Math. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Math. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Math. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names and salaries of instructors who advise students in the Math department?", "output": "select t2.name, t2.salary from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'Math'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Math. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Math. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Math. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.", "output": "select t2.name from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'Math' order by t3.tot_cred"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Math. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Math. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Math. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of all instructors who advise students in the math depart sorted by total credits of the student.", "output": "select t2.name from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id where t3.dept_name = 'Math' order by t3.tot_cred"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as Mobile Computing. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the course title of the prerequisite of course Mobile Computing?", "output": "select title from course where course_id in (select t1.prereq_id from prereq as t1 join course as t2 on t1.course_id = t2.course_id where t2.title = 'Mobile Computing')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as Mobile Computing. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the title of the course that is a prerequisite for Mobile Computing?", "output": "select title from course where course_id in (select t1.prereq_id from prereq as t1 join course as t2 on t1.course_id = t2.course_id where t2.title = 'Mobile Computing')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of instructor who is the advisor of the student who has the highest number of total credits.", "output": "select t2.name from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id order by t3.tot_cred desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the name of the instructor who advises the student with the greatest number of total credits?", "output": "select t2.name from advisor as t1 join instructor as t2 on t1.i_id = t2.id join student as t3 on t1.s_id = t3.id order by t3.tot_cred desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of instructors who didn't teach any courses?", "output": "select name from instructor where id not in (select id from teaches)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of instructors who didn't teach?", "output": "select name from instructor where id not in (select id from teaches)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the id of instructors who didn't teach any courses?", "output": "select id from instructor except select id from teaches"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the ids of instructors who didnt' teach?", "output": "select id from instructor except select id from teaches"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of instructors who didn't each any courses in any Spring semester.", "output": "select name from instructor where id not in (select id from teaches where semester = 'Spring')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of instructors who didn't teach courses in the Spring?", "output": "select name from instructor where id not in (select id from teaches where semester = 'Spring')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of the department which has the highest average salary of professors.", "output": "select dept_name from instructor group by dept_name order by avg(salary) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Which department has the highest average instructor salary?", "output": "select dept_name from instructor group by dept_name order by avg(salary) desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the number and averaged salary of all instructors who are in the department with the highest budget.", "output": "select avg(t1.salary), count(*) from instructor as t1 join department as t2 on t1.dept_name = t2.dept_name order by t2.budget desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many instructors are in the department with the highest budget, and what is their average salary?", "output": "select avg(t1.salary), count(*) from instructor as t1 join department as t2 on t1.dept_name = t2.dept_name order by t2.budget desc limit 1"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What is the title and credits of the course that is taught in the largest classroom (with the highest capacity)?", "output": "select t3.title, t3.credits from classroom as t1 join section as t2 on t1.building = t2.building and t1.room_number = t2.room_number join course as t3 on t2.course_id = t3.course_id where t1.capacity = (select max(capacity) from classroom)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Give the title and credits for the course that is taught in the classroom with the greatest capacity.", "output": "select t3.title, t3.credits from classroom as t1 join section as t2 on t1.building = t2.building and t1.room_number = t2.room_number join course as t3 on t2.course_id = t3.course_id where t1.capacity = (select max(capacity) from classroom)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Biology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Biology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Biology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Biology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of students who didn't take any course from Biology department.", "output": "select name from student where id not in (select t1.id from takes as t1 join course as t2 on t1.course_id = t2.course_id where t2.dept_name = 'Biology')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Biology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Biology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Biology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Biology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of students who haven't taken any Biology courses?", "output": "select name from student where id not in (select t1.id from takes as t1 join course as t2 on t1.course_id = t2.course_id where t2.dept_name = 'Biology')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the total number of students and total number of instructors for each department.", "output": "select count(distinct t2.id), count(distinct t3.id), t3.dept_name from department as t1 join student as t2 on t1.dept_name = t2.dept_name join instructor as t3 on t1.dept_name = t3.dept_name group by t3.dept_name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many students and instructors are in each department?", "output": "select count(distinct t2.id), count(distinct t3.id), t3.dept_name from department as t1 join student as t2 on t1.dept_name = t2.dept_name join instructor as t3 on t1.dept_name = t3.dept_name group by t3.dept_name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Finance. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as International Finance.The dept_name contains values such as Finance. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Finance. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Finance.The dept_name contains values such as Finance. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of students who have taken the prerequisite course of the course with title International Finance.", "output": "select t1.name from student as t1 join takes as t2 on t1.id = t2.id where t2.course_id in (select t4.prereq_id from course as t3 join prereq as t4 on t3.course_id = t4.course_id where t3.title = 'International Finance')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Finance. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The title contains values such as International Finance.The dept_name contains values such as Finance. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Finance. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Finance.The dept_name contains values such as Finance. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of students who have taken the prerequisite for the course International Finance?", "output": "select t1.name from student as t1 join takes as t2 on t1.id = t2.id where t2.course_id in (select t4.prereq_id from course as t3 join prereq as t4 on t3.course_id = t4.course_id where t3.title = 'International Finance')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Physics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Physics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Physics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Physics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name and salary of instructors whose salary is below the average salary of the instructors in the Physics department.", "output": "select name, salary from instructor where salary < (select avg(salary) from instructor where dept_name = 'Physics')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Physics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Physics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Physics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Physics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?", "output": "select name, salary from instructor where salary < (select avg(salary) from instructor where dept_name = 'Physics')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the name of students who took some course offered by Statistics department.", "output": "select t3.name from course as t1 join takes as t2 on t1.course_id = t2.course_id join student as t3 on t2.id = t3.id where t1.dept_name = 'Statistics'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Statistics. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Statistics. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Statistics. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Statistics. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of students who have taken Statistics courses?", "output": "select t3.name from course as t1 join takes as t2 on t1.course_id = t2.course_id join student as t3 on t2.id = t3.id where t1.dept_name = 'Statistics'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Psychology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Psychology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Psychology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Psychology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.", "output": "select t2.building, t2.room_number, t2.semester, t2.year from course as t1 join section as t2 on t1.course_id = t2.course_id where t1.dept_name = 'Psychology' order by t1.title"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Psychology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Psychology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Psychology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Psychology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the building, room number, semester and year of courses in the Psychology department, sorted using course title?", "output": "select t2.building, t2.room_number, t2.semester, t2.year from course as t1 join section as t2 on t1.course_id = t2.course_id where t1.dept_name = 'Psychology' order by t1.title"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of all instructors in computer science department", "output": "select name from instructor where dept_name = 'Comp. sci.'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of all instructors in the Comp. Sci. department?", "output": "select name from instructor where dept_name = 'Comp. sci.'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of all instructors in Comp. Sci. department with salary > 80000.", "output": "select name from instructor where dept_name = 'Comp. sci.' and salary > 80000"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of the instructors in the Comp. Sci. department who earn more than 80000?", "output": "select name from instructor where dept_name = 'Comp. sci.' and salary > 80000"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of all instructors who have taught some course and the course_id.", "output": "select name, course_id from instructor as t1 join teaches as t2 on t1.id = t2.id"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of all instructors who have taught a course, as well as the corresponding course id?", "output": "select name, course_id from instructor as t1 join teaches as t2 on t1.id = t2.id"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of all instructors in the Art department who have taught some course and the course_id.", "output": "select name, course_id from instructor as t1 join teaches as t2 on t1.id = t2.id where t1.dept_name = 'Art'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of Art instructors who have taught a course, and the corresponding course id?", "output": "select name, course_id from instructor as t1 join teaches as t2 on t1.id = t2.id where t1.dept_name = 'Art'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of all instructors whose name includes the substring \u201cdar\u201d.", "output": "select name from instructor where name like '%dar%'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of all instructors with names that include \"dar\"?", "output": "select name from instructor where name like '%dar%'"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "List in alphabetic order the names of all distinct instructors.", "output": "select distinct name from instructor order by name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "List the distinct names of the instructors, ordered by name.", "output": "select distinct name from instructor order by name"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find courses that ran in Fall 2009 or in Spring 2010.", "output": "select course_id from section where semester = 'Fall' and year = 2009 union select course_id from section where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the ids for courses in the Fall of 2009 or the Spring of 2010?", "output": "select course_id from section where semester = 'Fall' and year = 2009 union select course_id from section where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find courses that ran in Fall 2009 and in Spring 2010.", "output": "select course_id from section where semester = 'Fall' and year = 2009 intersect select course_id from section where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?", "output": "select course_id from section where semester = 'Fall' and year = 2009 intersect select course_id from section where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find courses that ran in Fall 2009 but not in Spring 2010.", "output": "select course_id from section where semester = 'Fall' and year = 2009 except select course_id from section where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring, Fall. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring, Fall. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The name contains values such as Fall. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring, Fall. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the ids of courses offered in Fall of 2009 but not in Spring of 2010?", "output": "select course_id from section where semester = 'Fall' and year = 2009 except select course_id from section where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the salaries of all distinct instructors that are less than the largest salary.", "output": "select distinct salary from instructor where salary < (select max(salary) from instructor)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the distinct salaries of all instructors who earned less than the maximum salary?", "output": "select distinct salary from instructor where salary < (select max(salary) from instructor)"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the total number of instructors who teach a course in the Spring 2010 semester.", "output": "select count (distinct id) from teaches where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. The semester contains values such as Spring. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. The semester contains values such as Spring. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. The semester contains values such as Spring. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "How many instructors teach a course in the Spring of 2010?", "output": "select count (distinct id) from teaches where semester = 'Spring' and year = 2010"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names and average salaries of all departments whose average salary is greater than 42000.", "output": "select dept_name, avg (salary) from instructor group by dept_name having avg (salary) > 42000"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names and average salaries for departments with average salary higher than 42000?", "output": "select dept_name, avg (salary) from instructor group by dept_name having avg (salary) > 42000"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Biology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Biology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Biology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Biology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.", "output": "select name from instructor where salary > (select min(salary) from instructor where dept_name = 'Biology')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Biology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Biology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Biology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Biology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of instructors who earn more than at least one instructor from the Biology department?", "output": "select name from instructor where salary > (select min(salary) from instructor where dept_name = 'Biology')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Biology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Biology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Biology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Biology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.", "output": "select name from instructor where salary > (select max(salary) from instructor where dept_name = 'Biology')"}, {"instruction": "college_2 contains tables such as classroom, department, course, instructor, section, teaches, student, takes, advisor, time_slot, prereq. Table classroom has columns such as building, room_number, capacity. building is the primary key. Table department has columns such as dept_name, building, budget. dept_name is the primary key. The dept_name contains values such as Biology. Table course has columns such as course_id, title, dept_name, credits. course_id is the primary key. The dept_name contains values such as Biology. Table instructor has columns such as id, name, dept_name, salary. id is the primary key. The dept_name contains values such as Biology. Table section has columns such as course_id, sec_id, semester, year, building, room_number, time_slot_id. course_id is the primary key. Table teaches has columns such as id, course_id, sec_id, semester, year. id is the primary key. Table student has columns such as id, name, dept_name, tot_cred. id is the primary key. The dept_name contains values such as Biology. Table takes has columns such as id, course_id, sec_id, semester, year, grade. id is the primary key. Table advisor has columns such as s_id, i_id. s_id is the primary key. Table time_slot has columns such as time_slot_id, day, start_hr, start_min, end_hr, end_min. time_slot_id is the primary key. Table prereq has columns such as course_id, prereq_id. course_id is the primary key. The dept_name of course is the foreign key of dept_name of department. The dept_name of instructor is the foreign key of dept_name of department. The building of section is the foreign key of building of classroom. The room_number of section is the foreign key of room_number of classroom. The course_id of section is the foreign key of course_id of course. The id of teaches is the foreign key of id of instructor. The course_id of teaches is the foreign key of course_id of section. The sec_id of teaches is the foreign key of sec_id of section. The semester of teaches is the foreign key of semester of section. The year of teaches is the foreign key of year of section. The dept_name of student is the foreign key of dept_name of department. The id of takes is the foreign key of id of student. The course_id of takes is the foreign key of course_id of section. The sec_id of takes is the foreign key of sec_id of section. The semester of takes is the foreign key of semester of section. The year of takes is the foreign key of year of section. The s_id of advisor is the foreign key of id of student. The i_id of advisor is the foreign key of id of instructor. The prereq_id of prereq is the foreign key of course_id of course. The course_id of prereq is the foreign key of course_id of course.", "input": "What are the names of all instructors with a higher salary than any of the instructors in the Biology department?", "output": "select name from instructor where salary > (select max(salary) from instructor where dept_name = 'Biology')"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "How many debates are there?", "output": "select count(*) from debate"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "List the venues of debates in ascending order of the number of audience.", "output": "select venue from debate order by num_of_audience asc"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "What are the date and venue of each debate?", "output": "select date, venue from debate"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "List the dates of debates with number of audience bigger than 150", "output": "select date from debate where num_of_audience > 150"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the names of people aged either 35 or 36.", "output": "select name from people where age = 35 or age = 36"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "What is the party of the youngest people?", "output": "select party from people order by age asc limit 1"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show different parties of people along with the number of people in each party.", "output": "select party, count(*) from people group by party"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the party that has the most people.", "output": "select party from people group by party order by count(*) desc limit 1"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the distinct venues of debates", "output": "select distinct venue from debate"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the names of people, and dates and venues of debates they are on the affirmative side.", "output": "select t3.name, t2.date, t2.venue from debate_people as t1 join debate as t2 on t1.debate_id = t2.debate_id join people as t3 on t1.affirmative = t3.people_id"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.", "output": "select t3.name, t2.date, t2.venue from debate_people as t1 join debate as t2 on t1.debate_id = t2.debate_id join people as t3 on t1.negative = t3.people_id order by t3.name asc"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the names of people that are on affirmative side of debates with number of audience bigger than 200.", "output": "select t3.name from debate_people as t1 join debate as t2 on t1.debate_id = t2.debate_id join people as t3 on t1.affirmative = t3.people_id where t2.num_of_audience > 200"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the names of people and the number of times they have been on the affirmative side of debates.", "output": "select t2.name, count(*) from debate_people as t1 join people as t2 on t1.affirmative = t2.people_id group by t2.name"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "Show the names of people who have been on the negative side of debates at least twice.", "output": "select t2.name from debate_people as t1 join people as t2 on t1.negative = t2.people_id group by t2.name having count(*) >= 2"}, {"instruction": "debate contains tables such as people, debate, debate_people. Table people has columns such as people_id, district, name, party, age. people_id is the primary key. Table debate has columns such as debate_id, date, venue, num_of_audience. debate_id is the primary key. Table debate_people has columns such as debate_id, affirmative, negative, if_affirmative_win. debate_id is the primary key. The negative of debate_people is the foreign key of people_id of people. The affirmative of debate_people is the foreign key of people_id of people. The debate_id of debate_people is the foreign key of debate_id of debate.", "input": "List the names of people that have not been on the affirmative side of debates.", "output": "select name from people where people_id not in (select affirmative from debate_people)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "List the names of all the customers in alphabetical order.", "output": "select customer_details from customers order by customer_details"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Sort the customer names in alphabetical order.", "output": "select customer_details from customers order by customer_details"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. The customer_details contains values such as Dayana Robel. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find all the policy type codes associated with the customer \"Dayana Robel\"", "output": "select policy_type_code from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_details = \"Dayana Robel\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. The customer_details contains values such as Dayana Robel. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What are the type codes of the policies used by the customer \"Dayana Robel\"?", "output": "select policy_type_code from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_details = \"Dayana Robel\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which type of policy is most frequently used? Give me the policy type code.", "output": "select policy_type_code from policies group by policy_type_code order by count(*) desc limit 1"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the type code of the most frequently used policy.", "output": "select policy_type_code from policies group by policy_type_code order by count(*) desc limit 1"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find all the policy types that are used by more than 2 customers.", "output": "select policy_type_code from policies group by policy_type_code having count(*) > 2"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which types of policy are chosen by more than 2 customers? Give me the policy type codes.", "output": "select policy_type_code from policies group by policy_type_code having count(*) > 2"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the total and average amount paid in claim headers.", "output": "select sum(amount_piad), avg(amount_piad) from claim_headers"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What are the total amount and average amount paid in claim headers?", "output": "select sum(amount_piad), avg(amount_piad) from claim_headers"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. The document_type_code contains values such as Document. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the total amount claimed in the most recently created document.", "output": "select sum(t1.amount_claimed) from claim_headers as t1 join claims_documents as t2 on t1.claim_header_id = t2.claim_id where t2.created_date = (select created_date from claims_documents order by created_date limit 1)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. The document_type_code contains values such as Document. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "How much amount in total were claimed in the most recently created document?", "output": "select sum(t1.amount_claimed) from claim_headers as t1 join claims_documents as t2 on t1.claim_header_id = t2.claim_id where t2.created_date = (select created_date from claims_documents order by created_date limit 1)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What is the name of the customer who has made the largest amount of claim in a single claim?", "output": "select t3.customer_details from claim_headers as t1 join policies as t2 on t1.policy_id = t2.policy_id join customers as t3 on t2.customer_id = t3.customer_id where t1.amount_claimed = (select max(amount_claimed) from claim_headers)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which customer made the largest amount of claim in a single claim? Return the customer details.", "output": "select t3.customer_details from claim_headers as t1 join policies as t2 on t1.policy_id = t2.policy_id join customers as t3 on t2.customer_id = t3.customer_id where t1.amount_claimed = (select max(amount_claimed) from claim_headers)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What is the name of the customer who has made the minimum amount of payment in one claim?", "output": "select t3.customer_details from claim_headers as t1 join policies as t2 on t1.policy_id = t2.policy_id join customers as t3 on t2.customer_id = t3.customer_id where t1.amount_piad = (select min(amount_piad) from claim_headers)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which customer made the smallest amount of claim in one claim? Return the customer details.", "output": "select t3.customer_details from claim_headers as t1 join policies as t2 on t1.policy_id = t2.policy_id join customers as t3 on t2.customer_id = t3.customer_id where t1.amount_piad = (select min(amount_piad) from claim_headers)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the names of customers who have no policies associated.", "output": "select customer_details from customers except select t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What are the names of customers who do not have any policies?", "output": "select customer_details from customers except select t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "How many claim processing stages are there in total?", "output": "select count(*) from claims_processing_stages"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the number of distinct stages in claim processing.", "output": "select count(*) from claims_processing_stages"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What is the name of the claim processing stage that most of the claims are on?", "output": "select t2.claim_status_name from claims_processing as t1 join claims_processing_stages as t2 on t1.claim_stage_id = t2.claim_stage_id group by t1.claim_stage_id order by count(*) desc limit 1"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which claim processing stage has the most claims? Show the claim status name.", "output": "select t2.claim_status_name from claims_processing as t1 join claims_processing_stages as t2 on t1.claim_stage_id = t2.claim_stage_id group by t1.claim_stage_id order by count(*) desc limit 1"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the names of customers whose name contains \"Diana\".", "output": "select customer_details from customers where customer_details like \"%diana%\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which customers have the substring \"Diana\" in their names? Return the customer details.", "output": "select customer_details from customers where customer_details like \"%diana%\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. The policy_type_code contains values such as Deputy. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the names of the customers who have an deputy policy.", "output": "select distinct t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.policy_type_code = \"Deputy\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. The policy_type_code contains values such as Deputy. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which customers have an insurance policy with the type code \"Deputy\"? Give me the customer details.", "output": "select distinct t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.policy_type_code = \"Deputy\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. The policy_type_code contains values such as Uniformed, Deputy. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the names of customers who either have an deputy policy or uniformed policy.", "output": "select distinct t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.policy_type_code = \"Deputy\" or t1.policy_type_code = \"Uniform\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. The policy_type_code contains values such as Deputy, Uniformed. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which customers have an insurance policy with the type code \"Deputy\" or \"Uniform\"? Return the customer details.", "output": "select distinct t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.policy_type_code = \"Deputy\" or t1.policy_type_code = \"Uniform\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the names of all the customers and staff members.", "output": "select customer_details from customers union select staff_details from staff"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What are the names of the customers and staff members?", "output": "select customer_details from customers union select staff_details from staff"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the number of records of each policy type and its type code.", "output": "select policy_type_code, count(*) from policies group by policy_type_code"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "For each policy type, return its type code and its count in the record.", "output": "select policy_type_code, count(*) from policies group by policy_type_code"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the name of the customer that has been involved in the most policies.", "output": "select t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_details order by count(*) desc limit 1"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which customer have the most policies? Give me the customer details.", "output": "select t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_details order by count(*) desc limit 1"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. The claim_status_name contains values such as Open. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "What is the description of the claim status \"Open\"?", "output": "select claim_status_description from claims_processing_stages where claim_status_name = \"Open\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. The claim_status_name contains values such as Open. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the description of the claim status \"Open\".", "output": "select claim_status_description from claims_processing_stages where claim_status_name = \"Open\""}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "How many distinct claim outcome codes are there?", "output": "select count(distinct claim_outcome_code) from claims_processing"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Count the number of distinct claim outcome codes.", "output": "select count(distinct claim_outcome_code) from claims_processing"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Which customer is associated with the latest policy?", "output": "select t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.start_date = (select max(start_date) from policies)"}, {"instruction": "insurance_and_eClaims contains tables such as customers, staff, policies, claim_headers, claims_documents, claims_processing_stages, claims_processing. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table staff has columns such as staff_id, staff_details. staff_id is the primary key. Table policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claim_headers has columns such as claim_header_id, claim_status_code, claim_type_code, policy_id, date_of_claim, date_of_settlement, amount_claimed, amount_piad. claim_header_id is the primary key. Table claims_documents has columns such as claim_id, document_type_code, created_by_staff_id, created_date. claim_id is the primary key. Table claims_processing_stages has columns such as claim_stage_id, next_claim_stage_id, claim_status_name, claim_status_description. claim_stage_id is the primary key. Table claims_processing has columns such as claim_processing_id, claim_id, claim_outcome_code, claim_stage_id, staff_id. claim_processing_id is the primary key. The customer_id of policies is the foreign key of customer_id of customers. The policy_id of claim_headers is the foreign key of policy_id of policies. The created_by_staff_id of claims_documents is the foreign key of staff_id of staff. The claim_id of claims_documents is the foreign key of claim_header_id of claim_headers. The staff_id of claims_processing is the foreign key of staff_id of staff. The claim_id of claims_processing is the foreign key of claim_header_id of claim_headers.", "input": "Find the customer who started a policy most recently.", "output": "select t2.customer_details from policies as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.start_date = (select max(start_date) from policies)"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the number of accounts.", "output": "select count(*) from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many accounts are there?", "output": "select count(*) from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many customers have opened an account?", "output": "select count(distinct customer_id) from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of customers who have an account.", "output": "select count(distinct customer_id) from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the id, the date of account opened, the account name, and other account detail for all accounts.", "output": "select account_id, date_account_opened, account_name, other_account_details from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the ids, date opened, name, and other details for all accounts?", "output": "select account_id, date_account_opened, account_name, other_account_details from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. The customer_first_name contains values such as Meaghan. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.", "output": "select t1.account_id, t1.date_account_opened, t1.account_name, t1.other_account_details from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = 'Meaghan'"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. The customer_first_name contains values such as Meaghan. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the ids, names, dates of opening, and other details for accounts corresponding to the customer with the first name \"Meaghan\"?", "output": "select t1.account_id, t1.date_account_opened, t1.account_name, t1.other_account_details from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = 'Meaghan'"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. The customer_first_name contains values such as Meaghan.The customer_last_name contains values such as Keeling. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.", "output": "select t1.account_name, t1.other_account_details from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Meaghan\" and t2.customer_last_name = \"Keeling\""}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. The customer_first_name contains values such as Meaghan.The customer_last_name contains values such as Keeling. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the names and other details for accounts corresponding to the customer named Meaghan Keeling?", "output": "select t1.account_name, t1.other_account_details from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.customer_first_name = \"Meaghan\" and t2.customer_last_name = \"Keeling\""}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the first name and last name for the customer with account name 900.", "output": "select t2.customer_first_name, t2.customer_last_name from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.account_name = \"900\""}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the full names of customers with the account name 900?", "output": "select t2.customer_first_name, t2.customer_last_name from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.account_name = \"900\""}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many customers don't have an account?", "output": "select count(*) from customers where customer_id not in (select customer_id from accounts)"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of customers who do not have an account.", "output": "select count(*) from customers where customer_id not in (select customer_id from accounts)"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the unique first names, last names, and phone numbers for all customers with any account.", "output": "select distinct t1.customer_first_name, t1.customer_last_name, t1.phone_number from customers as t1 join accounts as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the distinct first names, last names, and phone numbers for customers with accounts?", "output": "select distinct t1.customer_first_name, t1.customer_last_name, t1.phone_number from customers as t1 join accounts as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show customer ids who don't have an account.", "output": "select customer_id from customers except select customer_id from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the customer ids for customers who do not have an account?", "output": "select customer_id from customers except select customer_id from accounts"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many accounts does each customer have? List the number and customer id.", "output": "select count(*), customer_id from accounts group by customer_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of accounts corresponding to each customer id.", "output": "select count(*), customer_id from accounts group by customer_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What is the customer id, first and last name with most number of accounts.", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Return the id and full name of the customer with the most accounts.", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show id, first name and last name for all customers and the number of accounts.", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name, count(*) from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the the full names and ids for all customers, and how many accounts does each have?", "output": "select t1.customer_id, t2.customer_first_name, t2.customer_last_name, count(*) from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show first name and id for all customers with at least 2 accounts.", "output": "select t2.customer_first_name, t1.customer_id from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) >= 2"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the first names and ids for customers who have two or more accounts?", "output": "select t2.customer_first_name, t1.customer_id from accounts as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) >= 2"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the number of customers.", "output": "select count(*) from customers"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of customers.", "output": "select count(*) from customers"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the number of customers for each gender.", "output": "select gender, count(*) from customers group by gender"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many customers are there of each gender?", "output": "select gender, count(*) from customers group by gender"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many transactions do we have?", "output": "select count(*) from financial_transactions"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of transactions.", "output": "select count(*) from financial_transactions"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many transaction does each account have? Show the number and account id.", "output": "select count(*), account_id from financial_transactions"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of financial transactions that correspond to each account id.", "output": "select count(*), account_id from financial_transactions"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many transaction does account with name 337 have?", "output": "select count(*) from financial_transactions as t1 join accounts as t2 on t1.account_id = t2.account_id where t2.account_name = \"337\""}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of financial transactions that the account with the name 337 has.", "output": "select count(*) from financial_transactions as t1 join accounts as t2 on t1.account_id = t2.account_id where t2.account_name = \"337\""}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What is the average, minimum, maximum, and total transaction amount?", "output": "select avg(transaction_amount), min(transaction_amount), max(transaction_amount), sum(transaction_amount) from financial_transactions"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Return the average, minimum, maximum, and total transaction amounts.", "output": "select avg(transaction_amount), min(transaction_amount), max(transaction_amount), sum(transaction_amount) from financial_transactions"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show ids for all transactions whose amounts are greater than the average.", "output": "select transaction_id from financial_transactions where transaction_amount > (select avg(transaction_amount) from financial_transactions)"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the ids for transactions that have an amount greater than the average amount of a transaction?", "output": "select transaction_id from financial_transactions where transaction_amount > (select avg(transaction_amount) from financial_transactions)"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the transaction types and the total amount of transactions.", "output": "select transaction_type, sum(transaction_amount) from financial_transactions group by transaction_type"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are total transaction amounts for each transaction type?", "output": "select transaction_type, sum(transaction_amount) from financial_transactions group by transaction_type"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the account name, id and the number of transactions for each account.", "output": "select t2.account_name, t1.account_id, count(*) from financial_transactions as t1 join accounts as t2 on t1.account_id = t2.account_id group by t1.account_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Return the names and ids of each account, as well as the number of transactions.", "output": "select t2.account_name, t1.account_id, count(*) from financial_transactions as t1 join accounts as t2 on t1.account_id = t2.account_id group by t1.account_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the account id with most number of transactions.", "output": "select account_id from financial_transactions group by account_id order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What is the id of the account with the most transactions?", "output": "select account_id from financial_transactions group by account_id order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the account id and name with at least 4 transactions.", "output": "select t1.account_id, t2.account_name from financial_transactions as t1 join accounts as t2 on t1.account_id = t2.account_id group by t1.account_id having count(*) >= 4"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the ids and names of accounts with 4 or more transactions?", "output": "select t1.account_id, t2.account_name from financial_transactions as t1 join accounts as t2 on t1.account_id = t2.account_id group by t1.account_id having count(*) >= 4"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show all product sizes.", "output": "select distinct product_size from products"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the different product sizes?", "output": "select distinct product_size from products"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show all product colors.", "output": "select distinct product_color from products"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the different product colors?", "output": "select distinct product_color from products"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the invoice number and the number of transactions for each invoice.", "output": "select invoice_number, count(*) from financial_transactions group by invoice_number"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many transactions correspond to each invoice number?", "output": "select invoice_number, count(*) from financial_transactions group by invoice_number"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What is the invoice number and invoice date for the invoice with most number of transactions?", "output": "select t2.invoice_number, t2.invoice_date from financial_transactions as t1 join invoices as t2 on t1.invoice_number = t2.invoice_number group by t1.invoice_number order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?", "output": "select t2.invoice_number, t2.invoice_date from financial_transactions as t1 join invoices as t2 on t1.invoice_number = t2.invoice_number group by t1.invoice_number order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many invoices do we have?", "output": "select count(*) from invoices"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of invoices.", "output": "select count(*) from invoices"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show invoice dates and order id and details for all invoices.", "output": "select t1.invoice_date, t1.order_id, t2.order_details from invoices as t1 join orders as t2 on t1.order_id = t2.order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the invoice dates, order ids, and order details for all invoices?", "output": "select t1.invoice_date, t1.order_id, t2.order_details from invoices as t1 join orders as t2 on t1.order_id = t2.order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the order ids and the number of invoices for each order.", "output": "select order_id, count(*) from invoices group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many invoices correspond to each order id?", "output": "select order_id, count(*) from invoices group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What is the order id and order details for the order more than two invoices.", "output": "select t2.order_id, t2.order_details from invoices as t1 join orders as t2 on t1.order_id = t2.order_id group by t2.order_id having count(*) > 2"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Return the order ids and details for orderes with two or more invoices.", "output": "select t2.order_id, t2.order_details from invoices as t1 join orders as t2 on t1.order_id = t2.order_id group by t2.order_id having count(*) > 2"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What is the customer last name, id and phone number with most number of orders?", "output": "select t2.customer_last_name, t1.customer_id, t2.phone_number from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Return the last name, id and phone number of the customer who has made the greatest number of orders.", "output": "select t2.customer_last_name, t1.customer_id, t2.phone_number from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show all product names without an order.", "output": "select product_name from products except select t1.product_name from products as t1 join order_items as t2 on t1.product_id = t2.product_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the names of products that have never been ordered?", "output": "select product_name from products except select t1.product_name from products as t1 join order_items as t2 on t1.product_id = t2.product_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show all product names and the total quantity ordered for each product name.", "output": "select t2.product_name, sum(t1.product_quantity) from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t2.product_name"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are the different product names, and what is the sum of quantity ordered for each product?", "output": "select t2.product_name, sum(t1.product_quantity) from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t2.product_name"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the order ids and the number of items in each order.", "output": "select order_id, count(*) from order_items group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many order items correspond to each order id?", "output": "select order_id, count(*) from order_items group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show the product ids and the number of unique orders containing each product.", "output": "select product_id, count(distinct order_id) from order_items group by product_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many distinct order ids correspond to each product?", "output": "select product_id, count(distinct order_id) from order_items group by product_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show all product names and the number of customers having an order on each product.", "output": "select t2.product_name, count(*) from order_items as t1 join products as t2 on t1.product_id = t2.product_id join orders as t3 on t3.order_id = t1.order_id group by t2.product_name"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "What are teh names of the different products, as well as the number of customers who have ordered each product.", "output": "select t2.product_name, count(*) from order_items as t1 join products as t2 on t1.product_id = t2.product_id join orders as t3 on t3.order_id = t1.order_id group by t2.product_name"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show order ids and the number of products in each order.", "output": "select order_id, count(distinct product_id) from order_items group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many different products correspond to each order id?", "output": "select order_id, count(distinct product_id) from order_items group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Show order ids and the total quantity in each order.", "output": "select order_id, sum(product_quantity) from order_items group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Give the order ids for all orders, as well as the total product quantity in each.", "output": "select order_id, sum(product_quantity) from order_items group by order_id"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "How many products were not included in any order?", "output": "select count(*) from products where product_id not in ( select product_id from order_items )"}, {"instruction": "customers_and_invoices contains tables such as customers, orders, invoices, accounts, product_categories, products, financial_transactions, order_items, invoice_line_items. Table customers has columns such as customer_id, customer_first_name, customer_middle_initial, customer_last_name, gender, email_address, login_name, login_password, phone_number, town_city, state_county_province, country. customer_id is the primary key. Table orders has columns such as order_id, customer_id, date_order_placed, order_details. order_id is the primary key. Table invoices has columns such as invoice_number, order_id, invoice_date. invoice_number is the primary key. Table accounts has columns such as account_id, customer_id, date_account_opened, account_name, other_account_details. account_id is the primary key. Table product_categories has columns such as production_type_code, product_type_description, vat_rating. production_type_code is the primary key. Table products has columns such as product_id, parent_product_id, production_type_code, unit_price, product_name, product_color, product_size. product_id is the primary key. Table financial_transactions has columns such as transaction_id, account_id, invoice_number, transaction_type, transaction_date, transaction_amount, transaction_comment, other_transaction_details. is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, product_quantity, other_order_item_details. order_item_id is the primary key. Table invoice_line_items has columns such as order_item_id, invoice_number, product_id, product_title, product_quantity, product_price, derived_product_cost, derived_vat_payable, derived_total_cost. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The order_id of invoices is the foreign key of order_id of orders. The customer_id of accounts is the foreign key of customer_id of customers. The production_type_code of products is the foreign key of production_type_code of product_categories. The account_id of financial_transactions is the foreign key of account_id of accounts. The invoice_number of financial_transactions is the foreign key of invoice_number of invoices. The order_id of order_items is the foreign key of order_id of orders. The product_id of order_items is the foreign key of product_id of products. The product_id of invoice_line_items is the foreign key of product_id of products. The invoice_number of invoice_line_items is the foreign key of invoice_number of invoices. The order_item_id of invoice_line_items is the foreign key of order_item_id of order_items.", "input": "Count the number of products that were never ordered.", "output": "select count(*) from products where product_id not in ( select product_id from order_items )"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "How many churches opened before 1850 are there?", "output": "select count(*) from church where open_date < 1850"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the name, open date, and organizer for all churches.", "output": "select name, open_date, organized_by from church"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "List all church names in descending order of opening date.", "output": "select name from church order by open_date desc"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the opening year in whcih at least two churches opened.", "output": "select open_date from church group by open_date having count(*) >= 2"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the organizer and name for churches that opened between 1830 and 1840.", "output": "select organized_by, name from church where open_date between 1830 and 1840"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show all opening years and the number of churches that opened in that year.", "output": "select open_date, count(*) from church group by open_date"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the name and opening year for three churches that opened most recently.", "output": "select name, open_date from church order by open_date desc limit 3"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "How many female people are older than 30 in our record?", "output": "select count(*) from people where is_male = 'F' and age > 30"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the country where people older than 30 and younger than 25 are from.", "output": "select country from people where age < 25 intersect select country from people where age > 30"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the minimum, maximum, and average age for all people.", "output": "select min(age), max(age), avg(age) from people"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the name and country for all people whose age is smaller than the average.", "output": "select name, country from people where age < (select avg(age) from people)"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the pair of male and female names in all weddings after year 2014", "output": "select t2.name, t3.name from wedding as t1 join people as t2 on t1.male_id = t2.people_id join people as t3 on t1.female_id = t3.people_id where t1.year > 2014"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the name and age for all male people who don't have a wedding.", "output": "select name, age from people where is_male = 'T' and people_id not in (select male_id from wedding)"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show all church names except for those that had a wedding in year 2015.", "output": "select name from church except select t1.name from church as t1 join wedding as t2 on t1.church_id = t2.church_id where t2.year = 2015"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show all church names that have hosted least two weddings.", "output": "select t1.name from church as t1 join wedding as t2 on t1.church_id = t2.church_id group by t1.church_id having count(*) >= 2"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. The country contains values such as Canada. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the names for all females from Canada having a wedding in year 2016.", "output": "select t2.name from wedding as t1 join people as t2 on t1.female_id = t2.people_id where t1.year = 2016 and t2.is_male = 'F' and t2.country = 'Canada'"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "How many weddings are there in year 2016?", "output": "select count(*) from wedding where year = 2016"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show the church names for the weddings of all people older than 30.", "output": "select t4.name from wedding as t1 join people as t2 on t1.male_id = t2.people_id join people as t3 on t1.female_id = t3.people_id join church as t4 on t4.church_id = t1.church_id where t2.age > 30 or t3.age > 30"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "Show all countries and the number of people from each country.", "output": "select country, count(*) from people group by country"}, {"instruction": "wedding contains tables such as people, church, wedding. Table people has columns such as people_id, name, country, is_male, age. people_id is the primary key. Table church has columns such as church_id, name, organized_by, open_date, continuation_of. church_id is the primary key. Table wedding has columns such as church_id, male_id, female_id, year. church_id is the primary key. The female_id of wedding is the foreign key of people_id of people. The male_id of wedding is the foreign key of people_id of people. The church_id of wedding is the foreign key of church_id of church.", "input": "How many churches have a wedding in year 2016?", "output": "select count (distinct church_id) from wedding where year = 2016"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "How many artists do we have?", "output": "select count(*) from artist"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Count the number of artists.", "output": "select count(*) from artist"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show all artist name, age, and country ordered by the yeared they joined.", "output": "select name, age, country from artist order by year_join"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the names, ages, and countries of artists, sorted by the year they joined?", "output": "select name, age, country from artist order by year_join"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are all distinct country for artists?", "output": "select distinct country from artist"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Return the different countries for artists.", "output": "select distinct country from artist"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. The country contains values such as United States. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show all artist names and the year joined who are not from United States.", "output": "select name, year_join from artist where country != 'United States'"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. The country contains values such as United States. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the names and year of joining for artists that do not have the country \"United States\"?", "output": "select name, year_join from artist where country != 'United States'"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "How many artists are above age 46 and joined after 1990?", "output": "select count(*) from artist where age > 46 and year_join > 1990"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Count the number of artists who are older than 46 and joined after 1990.", "output": "select count(*) from artist where age > 46 and year_join > 1990"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. The country contains values such as United States. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What is the average and minimum age of all artists from United States.", "output": "select avg(age), min(age) from artist where country = 'United States'"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. The country contains values such as United States. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Return the average and minimum ages across artists from the United States.", "output": "select avg(age), min(age) from artist where country = 'United States'"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What is the name of the artist who joined latest?", "output": "select name from artist order by year_join desc limit 1"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Return the name of the artist who has the latest join year.", "output": "select name from artist order by year_join desc limit 1"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "How many exhibition are there in year 2005 or after?", "output": "select count(*) from exhibition where year >= 2005"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Count the number of exhibitions that happened in or after 2005.", "output": "select count(*) from exhibition where year >= 2005"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show theme and year for all exhibitions with ticket prices lower than 15.", "output": "select theme, year from exhibition where ticket_price < 15"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the theme and year for all exhibitions that have a ticket price under 15?", "output": "select theme, year from exhibition where ticket_price < 15"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show all artist names and the number of exhibitions for each artist.", "output": "select t2.name, count(*) from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id group by t1.artist_id"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "How many exhibitions has each artist had?", "output": "select t2.name, count(*) from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id group by t1.artist_id"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What is the name and country for the artist with most number of exhibitions?", "output": "select t2.name, t2.country from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id group by t1.artist_id order by count(*) desc limit 1"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Return the name and country corresponding to the artist who has had the most exhibitions.", "output": "select t2.name, t2.country from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id group by t1.artist_id order by count(*) desc limit 1"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show names for artists without any exhibition.", "output": "select name from artist where artist_id not in (select artist_id from exhibition)"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the names of artists that have not had any exhibitions?", "output": "select name from artist where artist_id not in (select artist_id from exhibition)"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What is the theme and artist name for the exhibition with a ticket price higher than the average?", "output": "select t1.theme, t2.name from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id where t1.ticket_price > (select avg(ticket_price) from exhibition)"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.", "output": "select t1.theme, t2.name from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id where t1.ticket_price > (select avg(ticket_price) from exhibition)"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.", "output": "select avg(ticket_price), min(ticket_price), max(ticket_price) from exhibition where year < 2009"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?", "output": "select avg(ticket_price), min(ticket_price), max(ticket_price) from exhibition where year < 2009"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show theme and year for all exhibitions in an descending order of ticket price.", "output": "select theme, year from exhibition order by ticket_price desc"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the themes and years for exhibitions, sorted by ticket price descending?", "output": "select theme, year from exhibition order by ticket_price desc"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What is the theme, date, and attendance for the exhibition in year 2004?", "output": "select t2.theme, t1.date, t1.attendance from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t2.year = 2004"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Return the themes, dates, and attendance for exhibitions that happened in 2004.", "output": "select t2.theme, t1.date, t1.attendance from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t2.year = 2004"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show all artist names who didn't have an exhibition in 2004.", "output": "select name from artist except select t2.name from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id where t1.year = 2004"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the names of artists who did not have an exhibition in 2004?", "output": "select name from artist except select t2.name from exhibition as t1 join artist as t2 on t1.artist_id = t2.artist_id where t1.year = 2004"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show the theme for exhibitions with both records of an attendance below 100 and above 500.", "output": "select t2.theme from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t1.attendance < 100 intersect select t2.theme from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t1.attendance > 500"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Which themes have had corresponding exhibitions that have had attendance both below 100 and above 500?", "output": "select t2.theme from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t1.attendance < 100 intersect select t2.theme from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t1.attendance > 500"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "How many exhibitions have a attendance more than 100 or have a ticket price below 10?", "output": "select count(*) from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t1.attendance > 100 or t2.ticket_price < 10"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.", "output": "select count(*) from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id where t1.attendance > 100 or t2.ticket_price < 10"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "Show all artist names with an average exhibition attendance over 200.", "output": "select t3.name from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id join artist as t3 on t3.artist_id = t2.artist_id group by t3.artist_id having avg(t1.attendance) > 200"}, {"instruction": "theme_gallery contains tables such as artist, exhibition, exhibition_record. Table artist has columns such as artist_id, name, country, year_join, age. artist_id is the primary key. Table exhibition has columns such as exhibition_id, year, theme, artist_id, ticket_price. exhibition_id is the primary key. Table exhibition_record has columns such as exhibition_id, date, attendance. exhibition_id is the primary key. The artist_id of exhibition is the foreign key of artist_id of artist. The exhibition_id of exhibition_record is the foreign key of exhibition_id of exhibition.", "input": "What are the names of artist whose exhibitions draw over 200 attendees on average?", "output": "select t3.name from exhibition_record as t1 join exhibition as t2 on t1.exhibition_id = t2.exhibition_id join artist as t3 on t3.artist_id = t2.artist_id group by t3.artist_id having avg(t1.attendance) > 200"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. The title contains values such as orange. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the id of the item whose title is \"orange\".", "output": "select i_id from item where title = \"orange\""}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "List all information in the item table.", "output": "select * from item"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the number of reviews.", "output": "select count(*) from review"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "How many users are there?", "output": "select count(*) from useracct"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the average and maximum rating of all reviews.", "output": "select avg(rating), max(rating) from review"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the highest rank of all reviews.", "output": "select min(rank) from review"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "How many different users wrote some reviews?", "output": "select count(distinct u_id) from review"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "How many different items were reviewed by some users?", "output": "select count(distinct i_id) from review"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the number of items that did not receive any review.", "output": "select count(*) from item where i_id not in (select i_id from review)"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the names of users who did not leave any review.", "output": "select name from useracct where u_id not in (select u_id from review)"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the names of goods that receive a rating of 10.", "output": "select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id where t2.rating = 10"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the titles of items whose rating is higher than the average review rating of all items.", "output": "select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id where t2.rating > (select avg(rating) from review)"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the titles of items that received any rating below 5.", "output": "select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id where t2.rating < 5"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the titles of items that received both a rating higher than 8 and a rating below 5.", "output": "select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id where t2.rating > 8 intersect select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id where t2.rating < 5"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the names of items whose rank is higher than 3 and whose average rating is above 5.", "output": "select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id where t2.rank > 3 intersect select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id group by t2.i_id having avg(t2.rating) > 5"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the name of the item with the lowest average rating.", "output": "select t1.title from item as t1 join review as t2 on t1.i_id = t2.i_id group by t2.i_id order by avg(t2.rating) limit 1"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "List the titles of all items in alphabetic order .", "output": "select title from item order by title"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the name of the user who gives the most reviews.", "output": "select t1.name from useracct as t1 join review as t2 on t1.u_id = t2.u_id group by t2.u_id order by count(*) desc limit 1"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the name and id of the item with the highest average rating.", "output": "select t1.title, t1.i_id from item as t1 join review as t2 on t1.i_id = t2.i_id group by t2.i_id order by avg(t2.rating) desc limit 1"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the name and id of the good with the highest average rank.", "output": "select t1.title, t1.i_id from item as t1 join review as t2 on t1.i_id = t2.i_id group by t2.i_id order by avg(t2.rank) desc limit 1"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "For each user, return the name and the average rating of reviews given by them.", "output": "select t1.name, avg(t2.rating) from useracct as t1 join review as t2 on t1.u_id = t2.u_id group by t2.u_id"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "For each user, find their name and the number of reviews written by them.", "output": "select t1.name, count(*) from useracct as t1 join review as t2 on t1.u_id = t2.u_id group by t2.u_id"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the name of the user who gave the highest rating.", "output": "select t1.name from useracct as t1 join review as t2 on t1.u_id = t2.u_id order by t2.rating desc limit 1"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the name of the source user with the highest average trust score.", "output": "select t1.name from useracct as t1 join trust as t2 on t1.u_id = t2.source_u_id group by t2.source_u_id order by avg(trust) desc limit 1"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find each target user's name and average trust score.", "output": "select t1.name, avg(trust) from useracct as t1 join trust as t2 on t1.u_id = t2.target_u_id group by t2.target_u_id"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the name of the target user with the lowest trust score.", "output": "select t1.name from useracct as t1 join trust as t2 on t1.u_id = t2.target_u_id order by trust limit 1"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the names of the items that did not receive any review.", "output": "select title from item where i_id not in (select i_id from review)"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the names of users who did not leave any review.", "output": "select name from useracct where u_id not in (select u_id from review)"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the number of users who did not write any review.", "output": "select count(*) from useracct where u_id not in (select u_id from review)"}, {"instruction": "epinions_1 contains tables such as item, review, useracct, trust. Table item has columns such as i_id, title. i_id is the primary key. Table review has columns such as a_id, u_id, i_id, rating, rank. a_id is the primary key. Table useracct has columns such as u_id, name. u_id is the primary key. Table trust has columns such as source_u_id, target_u_id, trust. is the primary key. The i_id of review is the foreign key of i_id of item. The u_id of review is the foreign key of u_id of useracct. The target_u_id of trust is the foreign key of u_id of useracct. The source_u_id of trust is the foreign key of u_id of useracct.", "input": "Find the number of items without any review.", "output": "select count(*) from item where i_id not in (select i_id from review)"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "How many players are there?", "output": "select count(*) from player"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "List the names of players in ascending order of votes.", "output": "select player_name from player order by votes asc"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "What are the gender and occupation of players?", "output": "select gender, occupation from player"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. The occupation contains values such as Researcher. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "List the name and residence for players whose occupation is not \"Researcher\".", "output": "select player_name, residence from player where occupation != \"Researcher\""}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. The residence contains values such as Brandon, Birtle. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show the names of sponsors of players whose residence is either \"Brandon\" or \"Birtle\".", "output": "select sponsor_name from player where residence = \"Brandon\" or residence = \"Birtle\""}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "What is the name of the player with the largest number of votes?", "output": "select player_name from player order by votes desc limit 1"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show different occupations along with the number of players in each occupation.", "output": "select occupation, count(*) from player group by occupation"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Please show the most common occupation of players.", "output": "select occupation from player group by occupation order by count(*) desc limit 1"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show the residences that have at least two players.", "output": "select residence from player group by residence having count(*) >= 2"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show the names of players and names of their coaches.", "output": "select t3.player_name, t2.coach_name from player_coach as t1 join coach as t2 on t1.coach_id = t2.coach_id join player as t3 on t1.player_id = t3.player_id"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show the names of players coached by the rank 1 coach.", "output": "select t3.player_name from player_coach as t1 join coach as t2 on t1.coach_id = t2.coach_id join player as t3 on t1.player_id = t3.player_id where t2.rank = 1"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show the names and genders of players with a coach starting after 2011.", "output": "select t3.player_name, t3.gender from player_coach as t1 join coach as t2 on t1.coach_id = t2.coach_id join player as t3 on t1.player_id = t3.player_id where t1.starting_year > 2011"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show the names of players and names of their coaches in descending order of the votes of players.", "output": "select t3.player_name, t2.coach_name from player_coach as t1 join coach as t2 on t1.coach_id = t2.coach_id join player as t3 on t1.player_id = t3.player_id order by t3.votes desc"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "List the names of players that do not have coaches.", "output": "select player_name from player where player_id not in (select player_id from player_coach)"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "Show the residences that have both a player of gender \"M\" and a player of gender \"F\".", "output": "select residence from player where gender = \"M\" intersect select residence from player where gender = \"F\""}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "How many coaches does each club has? List the club id, name and the number of coaches.", "output": "select t1.club_id, t1.club_name, count(*) from club as t1 join coach as t2 on t1.club_id = t2.club_id group by t1.club_id"}, {"instruction": "riding_club contains tables such as player, club, coach, player_coach, match_result. Table player has columns such as player_id, sponsor_name, player_name, gender, residence, occupation, votes, rank. player_id is the primary key. Table club has columns such as club_id, club_name, region, start_year. club_id is the primary key. Table coach has columns such as coach_id, coach_name, gender, club_id, rank. coach_id is the primary key. Table player_coach has columns such as player_id, coach_id, starting_year. player_id is the primary key. Table match_result has columns such as rank, club_id, gold, big_silver, small_silver, bronze, points. rank is the primary key. The club_id of coach is the foreign key of club_id of club. The coach_id of player_coach is the foreign key of coach_id of coach. The player_id of player_coach is the foreign key of player_id of player. The club_id of match_result is the foreign key of club_id of club.", "input": "How many gold medals has the club with the most coaches won?", "output": "select t1.club_id, t1.gold from match_result as t1 join coach as t2 on t1.club_id = t2.club_id group by t1.club_id order by count(*) desc limit 1"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "How many gymnasts are there?", "output": "select count(*) from gymnast"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Count the number of gymnasts.", "output": "select count(*) from gymnast"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "List the total points of gymnasts in descending order.", "output": "select total_points from gymnast order by total_points desc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the total points for all gymnasts, ordered by total points descending?", "output": "select total_points from gymnast order by total_points desc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "List the total points of gymnasts in descending order of floor exercise points.", "output": "select total_points from gymnast order by floor_exercise_points desc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the total points of gymnasts, ordered by their floor exercise points descending?", "output": "select total_points from gymnast order by floor_exercise_points desc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What is the average horizontal bar points for all gymnasts?", "output": "select avg(horizontal_bar_points) from gymnast"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the average horizontal bar points across all gymnasts.", "output": "select avg(horizontal_bar_points) from gymnast"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the names of people in ascending alphabetical order?", "output": "select name from people order by name asc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the names of people, ordered alphabetically.", "output": "select name from people order by name asc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the names of gymnasts?", "output": "select t2.name from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the names of the gymnasts.", "output": "select t2.name from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The hometown contains values such as Santo Domingo. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the names of gymnasts whose hometown is not \"Santo Domingo\"?", "output": "select t2.name from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id where t2.hometown != \"Santo Domingo\""}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The hometown contains values such as Santo Domingo. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the names of gymnasts who did not grow up in Santo Domingo.", "output": "select t2.name from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id where t2.hometown != \"Santo Domingo\""}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What is the age of the tallest person?", "output": "select age from people order by height desc limit 1"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the age of the person with the greatest height.", "output": "select age from people order by height desc limit 1"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "List the names of the top 5 oldest people.", "output": "select name from people order by age desc limit 5"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the names of the five oldest people?", "output": "select name from people order by age desc limit 5"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What is the total point count of the youngest gymnast?", "output": "select t1.total_points from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t2.age asc limit 1"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the total points of the gymnast with the lowest age.", "output": "select t1.total_points from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t2.age asc limit 1"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What is the average age of all gymnasts?", "output": "select avg(t2.age) from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the average age across all gymnasts.", "output": "select avg(t2.age) from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the distinct hometowns of gymnasts with total points more than 57.5?", "output": "select distinct t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id where t1.total_points > 57.5"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Give the different hometowns of gymnasts that have a total point score of above 57.5.", "output": "select distinct t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id where t1.total_points > 57.5"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the hometowns of gymnasts and the corresponding number of gymnasts?", "output": "select t2.hometown, count(*) from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id group by t2.hometown"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "How many gymnasts are from each hometown?", "output": "select t2.hometown, count(*) from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id group by t2.hometown"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What is the most common hometown of gymnasts?", "output": "select t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id group by t2.hometown order by count(*) desc limit 1"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Return the hometown that is most common among gymnasts.", "output": "select t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id group by t2.hometown order by count(*) desc limit 1"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the hometowns that are shared by at least two gymnasts?", "output": "select t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id group by t2.hometown having count(*) >= 2"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Give the hometowns from which two or more gymnasts are from.", "output": "select t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id group by t2.hometown having count(*) >= 2"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "List the names of gymnasts in ascending order by their heights.", "output": "select t2.name from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t2.height asc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the names of gymnasts, ordered by their heights ascending?", "output": "select t2.name from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t2.height asc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "List the distinct hometowns that are not associated with any gymnast.", "output": "select distinct hometown from people except select distinct t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "From which hometowns did no gymnasts come from?", "output": "select distinct hometown from people except select distinct t2.hometown from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Show the hometowns shared by people older than 23 and younger than 20.", "output": "select hometown from people where age > 23 intersect select hometown from people where age < 20"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "From which hometowns did both people older than 23 and younger than 20 come from?", "output": "select hometown from people where age > 23 intersect select hometown from people where age < 20"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "How many distinct hometowns did these people have?", "output": "select count(distinct hometown) from people"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Count the number of different hometowns of these people.", "output": "select count(distinct hometown) from people"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "Show the ages of gymnasts in descending order of total points.", "output": "select t2.age from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t1.total_points desc"}, {"instruction": "gymnast contains tables such as gymnast, people. Table gymnast has columns such as gymnast_id, floor_exercise_points, pommel_horse_points, rings_points, vault_points, parallel_bars_points, horizontal_bar_points, total_points. gymnast_id is the primary key. Table people has columns such as people_id, name, age, height, hometown. people_id is the primary key. The gymnast_id of gymnast is the foreign key of people_id of people.", "input": "What are the ages of the gymnasts, ordered descending by their total points?", "output": "select t2.age from gymnast as t1 join people as t2 on t1.gymnast_id = t2.people_id order by t1.total_points desc"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the total savings balance of all accounts except the account with name \u2018Brown\u2019.", "output": "select sum(t2.balance) from accounts as t1 join savings as t2 on t1.custid = t2.custid where t1.name != 'Brown'"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. The name contains values such as Brown. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the total balance of savings accounts not belonging to someone with the name Brown?", "output": "select sum(t2.balance) from accounts as t1 join savings as t2 on t1.custid = t2.custid where t1.name != 'Brown'"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "How many accounts are there in total?", "output": "select count(*) from accounts"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Count the number of accounts.", "output": "select count(*) from accounts"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the total checking balance in all accounts?", "output": "select sum(balance) from checking"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the total balance across checking accounts.", "output": "select sum(balance) from checking"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the average checking balance.", "output": "select avg(balance) from checking"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the average balance in checking accounts?", "output": "select avg(balance) from checking"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "How many accounts have a savings balance above the average savings balance?", "output": "select count(*) from savings where balance > (select avg(balance) from savings)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the number of accounts with a savings balance that is higher than the average savings balance.", "output": "select count(*) from savings where balance > (select avg(balance) from savings)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name and id of accounts whose checking balance is below the maximum checking balance.", "output": "select t1.custid, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance < (select max(balance) from checking)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the customer id and name corresponding to accounts with a checking balance less than the largest checking balance?", "output": "select t1.custid, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance < (select max(balance) from checking)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the checking balance of the account whose owner\u2019s name contains the substring \u2018ee\u2019?", "output": "select t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid where t1.name like '%ee%'"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the balance of the checking account belonging to an owner whose name contains 'ee'.", "output": "select t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid where t1.name like '%ee%'"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the checking balance and saving balance in the Brown\u2019s account.", "output": "select t2.balance, t3.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t1.name = 'Brown'"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. The name contains values such as Brown. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the checking and savings balances in accounts belonging to Brown?", "output": "select t2.balance, t3.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t1.name = 'Brown'"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the names of accounts whose checking balance is above the average checking balance, but savings balance is below the average savings balance.", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance > (select avg(balance) from checking) intersect select t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid where t2.balance < (select avg(balance) from savings)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance > (select avg(balance) from checking) intersect select t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid where t2.balance < (select avg(balance) from savings)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the checking balance of the accounts whose savings balance is higher than the average savings balance.", "output": "select t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid where t1.name in (select t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid where t2.balance > (select avg(balance) from savings))"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?", "output": "select t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid where t1.name in (select t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid where t2.balance > (select avg(balance) from savings))"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "List all customers\u2019 names in the alphabetical order.", "output": "select name from accounts order by name"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names of all the customers in alphabetical order?", "output": "select name from accounts order by name"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name of account that has the lowest total checking and saving balance.", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t2.balance + t3.balance limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the name corresponding to the accoung with the lowest sum of checking and savings balances?", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t2.balance + t3.balance limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the names and total checking and savings balances of accounts whose savings balance is higher than the average savings balance.", "output": "select t1.name, t2.balance + t3.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t3.balance > (select avg(balance) from savings)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?", "output": "select t1.name, t2.balance + t3.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t3.balance > (select avg(balance) from savings)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name and checking balance of the account with the lowest savings balance.", "output": "select t1.name, t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t3.balance limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?", "output": "select t1.name, t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t3.balance limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the number of checking accounts for each account name.", "output": "select count(*), t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid group by t1.name"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names of customers with accounts, and how many checking accounts do each of them have?", "output": "select count(*), t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid group by t1.name"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the total saving balance for each account name.", "output": "select sum(t2.balance), t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid group by t1.name"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names of customers with accounts, and what are the total savings balances for each?", "output": "select sum(t2.balance), t1.name from accounts as t1 join savings as t2 on t1.custid = t2.custid group by t1.name"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name of accounts whose checking balance is below the average checking balance.", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance < (select avg(balance) from checking)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names of customers with checking balances lower than the average checking balance?", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid where t2.balance < (select avg(balance) from checking)"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the saving balance of the account with the highest checking balance.", "output": "select t3.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t2.balance desc limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the savings balance of the account belonging to the customer with the highest checking balance?", "output": "select t3.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t2.balance desc limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the total checking and saving balance of all accounts sorted by the total balance in ascending order.", "output": "select t1.balance + t2.balance from checking as t1 join savings as t2 on t1.custid = t2.custid order by t1.balance + t2.balance"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the sum of checking and savings balances for all customers, ordered by the total balance?", "output": "select t1.balance + t2.balance from checking as t1 join savings as t2 on t1.custid = t2.custid order by t1.balance + t2.balance"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name and checking balance of the account with the lowest saving balance.", "output": "select t2.balance, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t3.balance limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What is the name and checking balance of the account which has the lowest savings balance?", "output": "select t2.balance, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t3.balance limit 1"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name, checking balance and saving balance of all accounts in the bank.", "output": "select t2.balance, t3.balance, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names, checking balances, and savings balances for all customers?", "output": "select t2.balance, t3.balance, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name, checking balance and savings balance of all accounts in the bank sorted by their total checking and savings balance in descending order.", "output": "select t2.balance, t3.balance, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t2.balance + t3.balance desc"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?", "output": "select t2.balance, t3.balance, t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid order by t2.balance + t3.balance desc"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name of accounts whose checking balance is higher than corresponding saving balance.", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t2.balance > t3.balance"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names of customers with a higher checking balance than savings balance?", "output": "select t1.name from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t2.balance > t3.balance"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.", "output": "select t1.name, t3.balance + t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t3.balance < t2.balance"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are the names of customers who have a savings balance lower than their checking balance, and what is the total of their checking and savings balances?", "output": "select t1.name, t3.balance + t2.balance from accounts as t1 join checking as t2 on t1.custid = t2.custid join savings as t3 on t1.custid = t3.custid where t3.balance < t2.balance"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "Find the name and savings balance of the top 3 accounts with the highest saving balance sorted by savings balance in descending order.", "output": "select t1.name, t2.balance from accounts as t1 join savings as t2 on t1.custid = t2.custid order by t2.balance desc limit 3"}, {"instruction": "small_bank_1 contains tables such as accounts, savings, checking. Table accounts has columns such as custid, name. custid is the primary key. Table savings has columns such as custid, balance. custid is the primary key. Table checking has columns such as custid, balance. custid is the primary key. The custid of savings is the foreign key of custid of accounts. The custid of checking is the foreign key of custid of accounts.", "input": "What are names and savings balances of the three accounts with the highest savings balances?", "output": "select t1.name, t2.balance from accounts as t1 join savings as t2 on t1.custid = t2.custid order by t2.balance desc limit 3"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "How many main stream browsers whose market share is at least 5 exist?", "output": "select count(*) from browser where market_share >= 5"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "List the name of browsers in descending order by market share.", "output": "select name from browser order by market_share desc"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "List the ids, names and market shares of all browsers.", "output": "select id, name, market_share from browser"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "What is the maximum, minimum and average market share of the listed browsers?", "output": "select max(market_share), min(market_share), avg(market_share) from browser"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. The name contains values such as Safari. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "What is the id and market share of the browser Safari?", "output": "select id, market_share from browser where name = 'Safari'"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. The connection contains values such as Broadband. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?", "output": "select name, operating_system from web_client_accelerator where connection != 'Broadband'"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. The name contains values such as CProxy. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?", "output": "select t1.name from browser as t1 join accelerator_compatible_browser as t2 on t1.id = t2.browser_id join web_client_accelerator as t3 on t2.accelerator_id = t3.id where t3.name = 'CProxy' and t2.compatible_since_year > 1998"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "What are the ids and names of the web accelerators that are compatible with two or more browsers?", "output": "select t1.id, t1.name from web_client_accelerator as t1 join accelerator_compatible_browser as t2 on t2.accelerator_id = t1.id group by t1.id having count(*) >= 2"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "What is the id and name of the browser that is compatible with the most web accelerators?", "output": "select t1.id, t1.name from browser as t1 join accelerator_compatible_browser as t2 on t1.id = t2.browser_id group by t1.id order by count(*) desc limit 1"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. The name contains values such as CACHEbox. Table browser has columns such as id, name, market_share. id is the primary key. The name contains values such as Internet Explorer. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "When did the web accelerator 'CACHEbox' and browser 'Internet Explorer' become compatible?", "output": "select t1.compatible_since_year from accelerator_compatible_browser as t1 join browser as t2 on t1.browser_id = t2.id join web_client_accelerator as t3 on t1.accelerator_id = t3.id where t3.name = 'CACHEbox' and t2.name = 'Internet Explorer'"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "How many different kinds of clients are supported by the web clients accelerators?", "output": "select count(distinct client) from web_client_accelerator"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "How many accelerators are not compatible with the browsers listed ?", "output": "select count(*) from web_client_accelerator where id not in ( select accelerator_id from accelerator_compatible_browser );"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "What distinct accelerator names are compatible with the browswers that have market share higher than 15?", "output": "select distinct t1.name from web_client_accelerator as t1 join accelerator_compatible_browser as t2 on t2.accelerator_id = t1.id join browser as t3 on t2.browser_id = t3.id where t3.market_share > 15;"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. The name contains values such as Fasterfox, CACHEbox. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "List the names of the browser that are compatible with both 'CACHEbox' and 'Fasterfox'.", "output": "select t3.name from web_client_accelerator as t1 join accelerator_compatible_browser as t2 on t2.accelerator_id = t1.id join browser as t3 on t2.browser_id = t3.id where t1.name = 'CACHEbox' intersect select t3.name from web_client_accelerator as t1 join accelerator_compatible_browser as t2 on t2.accelerator_id = t1.id join browser as t3 on t2.browser_id = t3.id where t1.name = 'Fasterfox'"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "Show the accelerator names and supporting operating systems that are not compatible with the browser named 'Opera'.", "output": "select name, operating_system from web_client_accelerator except select t1.name, t1.operating_system from web_client_accelerator as t1 join accelerator_compatible_browser as t2 on t2.accelerator_id = t1.id join browser as t3 on t2.browser_id = t3.id where t3.name = 'Opera'"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. The name contains values such as Opera. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "Which accelerator name contains substring \"Opera\"?", "output": "select name from web_client_accelerator where name like \"%opera%\""}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "Find the number of web accelerators used for each Operating system.", "output": "select operating_system, count(*) from web_client_accelerator group by operating_system"}, {"instruction": "browser_web contains tables such as web_client_accelerator, browser, accelerator_compatible_browser. Table web_client_accelerator has columns such as id, name, operating_system, client, connection. id is the primary key. Table browser has columns such as id, name, market_share. id is the primary key. Table accelerator_compatible_browser has columns such as accelerator_id, browser_id, compatible_since_year. accelerator_id is the primary key. The browser_id of accelerator_compatible_browser is the foreign key of id of browser. The accelerator_id of accelerator_compatible_browser is the foreign key of id of web_client_accelerator.", "input": "give me names of all compatible browsers and accelerators in the descending order of compatible year", "output": "select t2.name, t3.name from accelerator_compatible_browser as t1 join browser as t2 on t1.browser_id = t2.id join web_client_accelerator as t3 on t1.accelerator_id = t3.id order by t1.compatible_since_year desc"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "How many wrestlers are there?", "output": "select count(*) from wrestler"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Count the number of wrestlers.", "output": "select count(*) from wrestler"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "List the names of wrestlers in descending order of days held.", "output": "select name from wrestler order by days_held desc"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the names of the wrestlers, ordered descending by days held?", "output": "select name from wrestler order by days_held desc"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What is the name of the wrestler with the fewest days held?", "output": "select name from wrestler order by days_held asc limit 1"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Return the name of the wrestler who had the lowest number of days held.", "output": "select name from wrestler order by days_held asc limit 1"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the distinct reigns of wrestlers whose location is not \"Tokyo,Japan\" ?", "output": "select distinct reign from wrestler where location != \"Tokyo, Japan\""}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Give the different reigns of wrestlers who are not located in Tokyo, Japan.", "output": "select distinct reign from wrestler where location != \"Tokyo, Japan\""}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the names and location of the wrestlers?", "output": "select name, location from wrestler"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Give the names and locations of all wrestlers.", "output": "select name, location from wrestler"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The team contains values such as Team Orton.The eliminated_by contains values such as Orton. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the elimination moves of wrestlers whose team is \"Team Orton\"?", "output": "select elimination_move from elimination where team = \"Team Orton\""}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The team contains values such as Team Orton.The eliminated_by contains values such as Orton. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Return the elimination movies of wrestlers on Team Orton.", "output": "select elimination_move from elimination where team = \"Team Orton\""}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the names of wrestlers and the elimination moves?", "output": "select t2.name, t1.elimination_move from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Give the names of wrestlers and their elimination moves.", "output": "select t2.name, t1.elimination_move from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "List the names of wrestlers and the teams in elimination in descending order of days held.", "output": "select t2.name, t1.team from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id order by t2.days_held desc"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the names of wrestlers and their teams in elimination, ordered descending by days held?", "output": "select t2.name, t1.team from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id order by t2.days_held desc"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "List the time of elimination of the wrestlers with largest days held.", "output": "select t1.time from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id order by t2.days_held desc limit 1"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What is the time of elimination for the wrestler with the most days held?", "output": "select t1.time from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id order by t2.days_held desc limit 1"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Show times of elimination of wrestlers with days held more than 50.", "output": "select t1.time from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id where t2.days_held > 50"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the times of elimination for wrestlers with over 50 days held?", "output": "select t1.time from elimination as t1 join wrestler as t2 on t1.wrestler_id = t2.wrestler_id where t2.days_held > 50"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Show different teams in eliminations and the number of eliminations from each team.", "output": "select team, count(*) from elimination group by team"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "How many eliminations did each team have?", "output": "select team, count(*) from elimination group by team"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Show teams that have suffered more than three eliminations.", "output": "select team from elimination group by team having count(*) > 3"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Which teams had more than 3 eliminations?", "output": "select team from elimination group by team having count(*) > 3"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Show the reign and days held of wrestlers.", "output": "select reign, days_held from wrestler"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the reigns and days held of all wrestlers?", "output": "select reign, days_held from wrestler"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the names of wrestlers days held less than 100?", "output": "select name from wrestler where days_held < 100"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Return the names of wrestlers with fewer than 100 days held.", "output": "select name from wrestler where days_held < 100"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Please show the most common reigns of wrestlers.", "output": "select reign from wrestler group by reign order by count(*) desc limit 1"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Which reign is the most common among wrestlers?", "output": "select reign from wrestler group by reign order by count(*) desc limit 1"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "List the locations that are shared by more than two wrestlers.", "output": "select location from wrestler group by location having count(*) > 2"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Which locations are shared by more than two wrestlers?", "output": "select location from wrestler group by location having count(*) > 2"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "List the names of wrestlers that have not been eliminated.", "output": "select name from wrestler where wrestler_id not in (select wrestler_id from elimination)"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the names of wrestlers who have never been eliminated?", "output": "select name from wrestler where wrestler_id not in (select wrestler_id from elimination)"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The eliminated_by contains values such as Benjamin, Orton. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Show the teams that have both wrestlers eliminated by \"Orton\" and wrestlers eliminated by \"Benjamin\".", "output": "select team from elimination where eliminated_by = \"Orton\" intersect select team from elimination where eliminated_by = \"Benjamin\""}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The eliminated_by contains values such as Benjamin, Orton. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the teams that have both wrestlers eliminated by Orton and wrestlers eliminated by Benjamin?", "output": "select team from elimination where eliminated_by = \"Orton\" intersect select team from elimination where eliminated_by = \"Benjamin\""}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What is the number of distinct teams that suffer elimination?", "output": "select count (distinct team) from elimination"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "How many different teams have had eliminated wrestlers?", "output": "select count (distinct team) from elimination"}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The eliminated_by contains values such as Orton, Punk. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "Show the times of elimination by \"Punk\" or \"Orton\".", "output": "select time from elimination where eliminated_by = \"Punk\" or eliminated_by = \"Orton\""}, {"instruction": "wrestler contains tables such as wrestler, elimination. Table wrestler has columns such as wrestler_id, name, reign, days_held, location, event. wrestler_id is the primary key. Table elimination has columns such as elimination_id, wrestler_id, team, eliminated_by, elimination_move, time. elimination_id is the primary key. The eliminated_by contains values such as Orton, Punk. The wrestler_id of elimination is the foreign key of wrestler_id of wrestler.", "input": "What are the times of elimination for any instances in which the elimination was done by Punk or Orton?", "output": "select time from elimination where eliminated_by = \"Punk\" or eliminated_by = \"Orton\""}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "How many schools are there?", "output": "select count(*) from school"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Count the number of schools.", "output": "select count(*) from school"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show all school names in alphabetical order.", "output": "select school_name from school order by school_name"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "List the name, location, mascot for all schools.", "output": "select school_name, location, mascot from school"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "What are the total and average enrollment of all schools?", "output": "select sum(enrollment), avg(enrollment) from school"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "What are the mascots for schools with enrollments above the average?", "output": "select mascot from school where enrollment > (select avg(enrollment) from school)"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "List the name of the school with the smallest enrollment.", "output": "select school_name from school order by enrollment limit 1"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show the average, maximum, minimum enrollment of all schools.", "output": "select avg(enrollment), max(enrollment), min(enrollment) from school"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show each county along with the number of schools and total enrollment in each county.", "output": "select county, count(*), sum(enrollment) from school group by county"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. The school_name contains values such as Glenn. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "How many donors have endowment for school named \"Glenn\"?", "output": "select count(distinct t1.donator_name) from endowment as t1 join school as t2 on t1.school_id = t2.school_id where t2.school_name = \"Glenn\""}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "List each donator name and the amount of endowment in descending order of the amount of endowment.", "output": "select donator_name, sum(amount) from endowment group by donator_name order by sum(amount) desc"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "List the names of the schools without any endowment.", "output": "select school_name from school where school_id not in (select school_id from endowment)"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "List all the names of schools with an endowment amount smaller than or equal to 10.", "output": "select t2.school_name from endowment as t1 join school as t2 on t1.school_id = t2.school_id group by t1.school_id having sum(t1.amount) <= 10"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. The school_name contains values such as Triton, Glenn. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show the names of donors who donated to both school \"Glenn\" and \"Triton.\"", "output": "select t1.donator_name from endowment as t1 join school as t2 on t1.school_id = t2.school_id where t2.school_name = 'Glenn' intersect select t1.donator_name from endowment as t1 join school as t2 on t1.school_id = t2.school_id where t2.school_name = 'Triton'"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show the names of all the donors except those whose donation amount less than 9.", "output": "select donator_name from endowment except select donator_name from endowment where amount < 9"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "List the amount and donor name for the largest amount of donation.", "output": "select amount, donator_name from endowment order by amount desc limit 1"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "How many budgets are above 3000 in year 2001 or before?", "output": "select count(*) from budget where budgeted > 3000 and year <= 2001"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Count the number of budgets in year 2001 or before whose budgeted amount is greater than 3000", "output": "select count(*) from budget where budgeted > 3000 and year <= 2001"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show each school name, its budgeted amount, and invested amount in year 2002 or after.", "output": "select t2.school_name, t1.budgeted, t1.invested from budget as t1 join school as t2 on t1.school_id = t2.school_id where t1.year >= 2002"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show all donor names.", "output": "select distinct donator_name from endowment"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "How many budget record has a budget amount smaller than the invested amount?", "output": "select count(*) from budget where budgeted < invested"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. The school_name contains values such as Glenn. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "What is the total budget amount for school \"Glenn\" in all years?", "output": "select sum(t1.budgeted) from budget as t1 join school as t2 on t1.school_id = t2.school_id where t2.school_name = 'Glenn'"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Show the names of schools with a total budget amount greater than 100 or a total endowment greater than 10.", "output": "select t2.school_name from budget as t1 join school as t2 on t1.school_id = t2.school_id join endowment as t3 on t2.school_id = t3.school_id group by t2.school_name having sum(t1.budgeted) > 100 or sum(t3.amount) > 10"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Find the names of schools that have more than one donator with donation amount above 8.5.", "output": "select t2.school_name from endowment as t1 join school as t2 on t1.school_id = t2.school_id where t1.amount > 8.5 group by t1.school_id having count(*) > 1"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "Find the number of schools that have more than one donator whose donation amount is less than 8.5.", "output": "select count(*) from (select * from endowment where amount > 8.5 group by school_id having count(*) > 1)"}, {"instruction": "school_finance contains tables such as school, budget, endowment. Table school has columns such as school_id, school_name, location, mascot, enrollment, ihsaa_class, ihsaa_football_class, county. school_id is the primary key. Table budget has columns such as school_id, year, budgeted, total_budget_percent_budgeted, invested, total_budget_percent_invested, budget_invested_percent. school_id is the primary key. Table endowment has columns such as endowment_id, school_id, donator_name, amount. endowment_id is the primary key. The school_id of budget is the foreign key of school_id of school. The school_id of endowment is the foreign key of school_id of school.", "input": "List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.", "output": "select t1.school_name, t1.mascot, t1.ihsaa_football_class from school as t1 join budget as t2 on t1.school_id = t2.school_id where budgeted > 6000 or year < 2003 order by t2.total_budget_percent_invested, t2.total_budget_percent_budgeted"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "How many buildings are there?", "output": "select count(*) from building"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the name, street address, and number of floors for all buildings ordered by the number of floors.", "output": "select name, street_address, floors from building order by floors"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "What is the name of the tallest building?", "output": "select name from building order by height_feet desc limit 1"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "What are the average, maximum, and minimum number of floors for all buildings?", "output": "select avg(floors), max(floors), min(floors) from building"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the number of buildings with a height above the average or a number of floors above the average.", "output": "select count(*) from building where height_feet > (select avg(height_feet) from building) or floors > (select avg(floors) from building)"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "List the names of buildings with at least 200 feet of height and with at least 20 floors.", "output": "select name from building where height_feet >= 200 and floors >= 20"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. The type contains values such as Private. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the names and locations of institutions that are founded after 1990 and have the type \"Private\".", "output": "select institution, location from institution where founded > 1990 and type = 'Private'"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show institution types, along with the number of institutions and total enrollment for each type.", "output": "select type, count(*), sum(enrollment) from institution group by type"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the institution type with the largest number of institutions.", "output": "select type from institution group by type order by count(*) desc limit 1"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.", "output": "select type from institution where founded > 1990 and enrollment >= 1000"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the name of buildings that do not have any institution.", "output": "select name from building where building_id not in (select building_id from institution)"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the names of buildings except for those having an institution founded in 2003.", "output": "select name from building except select t1.name from building as t1 join institution as t2 on t1.building_id = t2.building_id where t2.founded = 2003"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "For each building, show the name of the building and the number of institutions in it.", "output": "select t1.name, count(*) from building as t1 join institution as t2 on t1.building_id = t2.building_id group by t1.building_id"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the names and heights of buildings with at least two institutions founded after 1880.", "output": "select t1.name, t1.height_feet from building as t1 join institution as t2 on t1.building_id = t2.building_id where t2.founded > 1880 group by t1.building_id having count(*) >= 2"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show all the distinct institution types.", "output": "select distinct type from institution"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show institution names along with the number of proteins for each institution.", "output": "select t1.institution, count(*) from institution as t1 join protein as t2 on t1.institution_id = t2.institution_id group by t1.institution_id"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. The type contains values such as Private. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "How many proteins are associated with an institution founded after 1880 or an institution with type \"Private\"?", "output": "select count(*) from institution as t1 join protein as t2 on t1.institution_id = t2.institution_id where t1.founded > 1880 or t1.type = 'Private'"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "Show the protein name and the institution name.", "output": "select t2.protein_name, t1.institution from institution as t1 join protein as t2 on t1.institution_id = t2.institution_id"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "How many proteins are associated with an institution in a building with at least 20 floors?", "output": "select count(*) from institution as t1 join protein as t2 on t1.institution_id = t2.institution_id join building as t3 on t3.building_id = t1.building_id where t3.floors >= 20"}, {"instruction": "protein_institute contains tables such as building, institution, protein. Table building has columns such as building_id, name, street_address, years_as_tallest, height_feet, floors. building_id is the primary key. Table institution has columns such as institution_id, institution, location, founded, type, enrollment, team, primary_conference, building_id. institution_id is the primary key. Table protein has columns such as common_name, protein_name, divergence_from_human_lineage, accession_number, sequence_length, sequence_identity_to_human_protein, institution_id. common_name is the primary key. The building_id of institution is the foreign key of building_id of building. The institution_id of protein is the foreign key of institution_id of institution.", "input": "How many institutions do not have an associated protein in our record?", "output": "select count(*) from institution where institution_id not in (select institution_id from protein)"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show all the locations where no cinema has capacity over 800.", "output": "select location from cinema except select location from cinema where capacity > 800"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show all the locations where some cinemas were opened in both year 2010 and year 2011.", "output": "select location from cinema where openning_year = 2010 intersect select location from cinema where openning_year = 2011"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "How many cinema do we have?", "output": "select count(*) from cinema"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Count the number of cinemas.", "output": "select count(*) from cinema"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show name, opening year, and capacity for each cinema.", "output": "select name, openning_year, capacity from cinema"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show the cinema name and location for cinemas with capacity above average.", "output": "select name, location from cinema where capacity > (select avg(capacity) from cinema)"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "What are all the locations with a cinema?", "output": "select distinct location from cinema"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Find the distinct locations that has a cinema.", "output": "select distinct location from cinema"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show all the cinema names and opening years in descending order of opening year.", "output": "select name, openning_year from cinema order by openning_year desc"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "What are the name and location of the cinema with the largest capacity?", "output": "select name, location from cinema order by capacity desc limit 1"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show the average, minimum, and maximum capacity for all the cinemas opened in year 2011 or later.", "output": "select avg(capacity), min(capacity), max(capacity) from cinema where openning_year >= 2011"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show each location and the number of cinemas there.", "output": "select location, count(*) from cinema group by location"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "What is the location with the most cinemas opened in year 2010 or later?", "output": "select location from cinema where openning_year >= 2010 group by location order by count(*) desc limit 1"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show all the locations with at least two cinemas with capacity above 300.", "output": "select location from cinema where capacity > 300 group by location having count(*) >= 2"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Which locations have 2 or more cinemas with capacity over 300?", "output": "select location from cinema where capacity > 300 group by location having count(*) >= 2"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show the title and director for all films.", "output": "select title, directed_by from film"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "What are the title and director of each film?", "output": "select title, directed_by from film"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show all directors.", "output": "select distinct directed_by from film"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Who are all the directors?", "output": "select distinct directed_by from film"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "List all directors along with the number of films directed by each director.", "output": "select directed_by, count(*) from film group by directed_by"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "What is total number of show times per dat for each cinema?", "output": "select t2.name, sum(t1.show_times_per_day) from schedule as t1 join cinema as t2 on t1.cinema_id = t2.cinema_id group by t1.cinema_id"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "What are the title and maximum price of each film?", "output": "select t2.title, max(t1.price) from schedule as t1 join film as t2 on t1.film_id = t2.film_id group by t1.film_id"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Give me the title and highest price for each film.", "output": "select t2.title, max(t1.price) from schedule as t1 join film as t2 on t1.film_id = t2.film_id group by t1.film_id"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show cinema name, film title, date, and price for each record in schedule.", "output": "select t3.name, t2.title, t1.date, t1.price from schedule as t1 join film as t2 on t1.film_id = t2.film_id join cinema as t3 on t1.cinema_id = t3.cinema_id"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "What are the title and director of the films without any schedule?", "output": "select title, directed_by from film where film_id not in (select film_id from schedule)"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Show director with the largest number of show times in total.", "output": "select t2.directed_by from schedule as t1 join film as t2 on t1.film_id = t2.film_id group by t2.directed_by order by sum(t1.show_times_per_day) desc limit 1"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Find the locations that have more than one movie theater with capacity above 300.", "output": "select location from cinema where capacity > 300 group by location having count(*) > 1"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "In which locations are there more than one movie theater with capacity above 300?", "output": "select location from cinema where capacity > 300 group by location having count(*) > 1"}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "How many films have the word 'Dummy' in their titles?", "output": "select count(*) from film where title like \"%dummy%\""}, {"instruction": "cinema contains tables such as film, cinema, schedule. Table film has columns such as film_id, rank_in_series, number_in_season, title, directed_by, original_air_date, production_code. film_id is the primary key. Table cinema has columns such as cinema_id, name, openning_year, capacity, location. cinema_id is the primary key. Table schedule has columns such as cinema_id, film_id, date, show_times_per_day, price. cinema_id is the primary key. The cinema_id of schedule is the foreign key of cinema_id of cinema. The film_id of schedule is the foreign key of film_id of film.", "input": "Count the number of films whose title contains the word 'Dummy'.", "output": "select count(*) from film where title like \"%dummy%\""}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. The good_or_bad_customer contains values such as good, bad. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "Are the customers holding coupons with amount 500 bad or good?", "output": "select t1.good_or_bad_customer from customers as t1 join discount_coupons as t2 on t1.coupon_id = t2.coupon_id where t2.coupon_amount = 500"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "How many bookings did each customer make? List the customer id, first name, and the count.", "output": "select t1.customer_id, t1.first_name, count(*) from customers as t1 join bookings as t2 on t1.customer_id = t2.customer_id group by t1.customer_id"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What is the maximum total amount paid by a customer? List the customer id and amount.", "output": "select customer_id, sum(amount_paid) from payments group by customer_id order by sum(amount_paid) desc limit 1"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the id and the amount of refund of the booking that incurred the most times of payments?", "output": "select t1.booking_id, t1.amount_of_refund from bookings as t1 join payments as t2 on t1.booking_id = t2.booking_id group by t1.booking_id order by count(*) desc limit 1"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What is the id of the product that is booked for 3 times?", "output": "select product_id from products_booked group by product_id having count(*) = 3"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What is the product description of the product booked with an amount of 102.76?", "output": "select t2.product_description from products_booked as t1 join products_for_hire as t2 on t1.product_id = t2.product_id where t1.booked_amount = 102.76"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. The product_name contains values such as Book collection A. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the start date and end date of the booking that has booked the product named 'Book collection A'?", "output": "select t3.booking_start_date, t3.booking_end_date from products_for_hire as t1 join products_booked as t2 on t1.product_id = t2.product_id join bookings as t3 on t2.booking_id = t3.booking_id where t1.product_name = 'Book collection A'"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the names of products whose availability equals to 1?", "output": "select t2.product_name from view_product_availability as t1 join products_for_hire as t2 on t1.product_id = t2.product_id where t1.available_yn = 1"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "How many different product types are there?", "output": "select count(distinct product_type_code) from products_for_hire"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. The good_or_bad_customer contains values such as good. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the first name, last name, and gender of all the good customers? Order by their last name.", "output": "select first_name, last_name, gender_mf from customers where good_or_bad_customer = 'good' order by last_name"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What is the average amount due for all the payments?", "output": "select avg(amount_due) from payments"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the maximum, minimum, and average booked count for the products booked?", "output": "select max(booked_count), min(booked_count), avg(booked_count) from products_booked"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are all the distinct payment types?", "output": "select distinct payment_type_code from payments"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the daily hire costs for the products with substring 'Book' in its name?", "output": "select daily_hire_cost from products_for_hire where product_name like '%book%'"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "How many products are never booked with amount higher than 200?", "output": "select count(*) from products_for_hire where product_id not in ( select product_id from products_booked where booked_amount > 200 )"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. The good_or_bad_customer contains values such as good, bad. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the coupon amount of the coupons owned by both good and bad customers?", "output": "select t1.coupon_amount from discount_coupons as t1 join customers as t2 on t1.coupon_id = t2.coupon_id where t2.good_or_bad_customer = 'good' intersect select t1.coupon_amount from discount_coupons as t1 join customers as t2 on t1.coupon_id = t2.coupon_id where t2.good_or_bad_customer = 'bad'"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. The payment_type_code contains values such as Check. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'", "output": "select payment_date from payments where amount_paid > 300 or payment_type_code = 'Check'"}, {"instruction": "products_for_hire contains tables such as discount_coupons, customers, bookings, products_for_hire, payments, products_booked, view_product_availability. Table discount_coupons has columns such as coupon_id, date_issued, coupon_amount. coupon_id is the primary key. Table customers has columns such as customer_id, coupon_id, good_or_bad_customer, first_name, last_name, gender_mf, date_became_customer, date_last_hire. customer_id is the primary key. Table bookings has columns such as booking_id, customer_id, booking_status_code, returned_damaged_yn, booking_start_date, booking_end_date, count_hired, amount_payable, amount_of_discount, amount_outstanding, amount_of_refund. booking_id is the primary key. Table products_for_hire has columns such as product_id, product_type_code, daily_hire_cost, product_name, product_description. product_id is the primary key. The product_type_code contains values such as Cutlery. Table payments has columns such as payment_id, booking_id, customer_id, payment_type_code, amount_paid_in_full_yn, payment_date, amount_due, amount_paid. payment_id is the primary key. Table products_booked has columns such as booking_id, product_id, returned_yn, returned_late_yn, booked_count, booked_amount. booking_id is the primary key. Table view_product_availability has columns such as product_id, booking_id, status_date, available_yn. status_date is the primary key. The coupon_id of customers is the foreign key of coupon_id of discount_coupons. The customer_id of bookings is the foreign key of customer_id of customers. The customer_id of payments is the foreign key of customer_id of customers. The booking_id of payments is the foreign key of booking_id of bookings. The product_id of products_booked is the foreign key of product_id of products_for_hire. The booking_id of products_booked is the foreign key of booking_id of bookings. The product_id of view_product_availability is the foreign key of product_id of products_for_hire. The booking_id of view_product_availability is the foreign key of booking_id of bookings.", "input": "What are the names and descriptions of the products that are of 'Cutlery' type and have daily hire cost lower than 20?", "output": "select product_name, product_description from products_for_hire where product_type_code = 'Cutlery' and daily_hire_cost < 20"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "How many phones are there?", "output": "select count(*) from phone"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "List the names of phones in ascending order of price.", "output": "select name from phone order by price asc"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "What are the memories and carriers of phones?", "output": "select memory_in_g, carrier from phone"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "List the distinct carriers of phones with memories bigger than 32.", "output": "select distinct carrier from phone where memory_in_g > 32"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. The carrier contains values such as TMobile, Sprint. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show the names of phones with carrier either \"Sprint\" or \"TMobile\".", "output": "select name from phone where carrier = \"Sprint\" or carrier = \"TMobile\""}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "What is the carrier of the most expensive phone?", "output": "select carrier from phone order by price desc limit 1"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show different carriers of phones together with the number of phones with each carrier.", "output": "select carrier, count(*) from phone group by carrier"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show the most frequently used carrier of the phones.", "output": "select carrier from phone group by carrier order by count(*) desc limit 1"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.", "output": "select carrier from phone where memory_in_g < 32 intersect select carrier from phone where memory_in_g > 64"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show the names of phones and the districts of markets they are on.", "output": "select t3.name, t2.district from phone_market as t1 join market as t2 on t1.market_id = t2.market_id join phone as t3 on t1.phone_id = t3.phone_id"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show the names of phones and the districts of markets they are on, in ascending order of the ranking of the market.", "output": "select t3.name, t2.district from phone_market as t1 join market as t2 on t1.market_id = t2.market_id join phone as t3 on t1.phone_id = t3.phone_id order by t2.ranking"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show the names of phones that are on market with number of shops greater than 50.", "output": "select t3.name from phone_market as t1 join market as t2 on t1.market_id = t2.market_id join phone as t3 on t1.phone_id = t3.phone_id where t2.num_of_shops > 50"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "For each phone, show its names and total number of stocks.", "output": "select t2.name, sum(t1.num_of_stock) from phone_market as t1 join phone as t2 on t1.phone_id = t2.phone_id group by t2.name"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "Show the names of phones that have total number of stocks bigger than 2000, in descending order of the total number of stocks.", "output": "select t2.name from phone_market as t1 join phone as t2 on t1.phone_id = t2.phone_id group by t2.name having sum(t1.num_of_stock) >= 2000 order by sum(t1.num_of_stock) desc"}, {"instruction": "phone_market contains tables such as phone, market, phone_market. Table phone has columns such as name, phone_id, memory_in_g, carrier, price. phone_id is the primary key. Table market has columns such as market_id, district, num_of_employees, num_of_shops, ranking. market_id is the primary key. Table phone_market has columns such as market_id, phone_id, num_of_stock. market_id is the primary key. The phone_id of phone_market is the foreign key of phone_id of phone. The market_id of phone_market is the foreign key of market_id of market.", "input": "List the names of phones that are not on any market.", "output": "select name from phone where phone_id not in (select phone_id from phone_market)"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "How many gas companies are there?", "output": "select count(*) from company"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What is the total number of companies?", "output": "select count(*) from company"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "List the company name and rank for all companies in the decreasing order of their sales.", "output": "select company, rank from company order by sales_billion desc"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What is the name and rank of every company ordered by descending number of sales?", "output": "select company, rank from company order by sales_billion desc"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The headquarters contains values such as USA. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show the company name and the main industry for all companies whose headquarters are not from USA.", "output": "select company, main_industry from company where headquarters != 'USA'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the companies and main industries of all companies that are not headquartered in the United States?", "output": "select company, main_industry from company where headquarters != 'USA'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show all company names and headquarters in the descending order of market value.", "output": "select company, headquarters from company order by market_value desc"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the names and headquarters of all companies ordered by descending market value?", "output": "select company, headquarters from company order by market_value desc"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show minimum, maximum, and average market value for all companies.", "output": "select min(market_value), max(market_value), avg(market_value) from company"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What is the minimum, maximum, and average market value for every company?", "output": "select min(market_value), max(market_value), avg(market_value) from company"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show all main industry for all companies.", "output": "select distinct main_industry from company"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the different main industries for all companies?", "output": "select distinct main_industry from company"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "List all headquarters and the number of companies in each headquarter.", "output": "select headquarters, count(*) from company group by headquarters"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "For each headquarter, what are the headquarter and how many companies are centered there?", "output": "select headquarters, count(*) from company group by headquarters"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show all main industry and total market value in each industry.", "output": "select main_industry, sum(market_value) from company group by main_industry"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the main indstries and total market value for each industry?", "output": "select main_industry, sum(market_value) from company group by main_industry"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "List the main industry with highest total market value and its number of companies.", "output": "select main_industry, count(*) from company group by main_industry order by sum(market_value) desc limit 1"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "For each main industry, what is the total number of companies for the industry with the highest total market value?", "output": "select main_industry, count(*) from company group by main_industry order by sum(market_value) desc limit 1"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show headquarters with at least two companies in the banking industry.", "output": "select headquarters from company where main_industry = 'Banking' group by headquarters having count(*) >= 2"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the headquarters with at least two companies in the banking industry?", "output": "select headquarters from company where main_industry = 'Banking' group by headquarters having count(*) >= 2"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show gas station id, location, and manager_name for all gas stations ordered by open year.", "output": "select station_id, location, manager_name from gas_station order by open_year"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the gas station ids, locations, and manager names for the gas stations ordered by opening year?", "output": "select station_id, location, manager_name from gas_station order by open_year"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "How many gas station are opened between 2000 and 2005?", "output": "select count(*) from gas_station where open_year between 2000 and 2005"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What is the total number of gas stations that opened between 2000 and 2005?", "output": "select count(*) from gas_station where open_year between 2000 and 2005"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show all locations and the number of gas stations in each location ordered by the count.", "output": "select location, count(*) from gas_station group by location order by count(*)"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "For each location, how many gas stations are there in order?", "output": "select location, count(*) from gas_station group by location order by count(*)"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Oil and gas, Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show all headquarters with both a company in banking industry and a company in Oil and gas.", "output": "select headquarters from company where main_industry = 'Banking' intersect select headquarters from company where main_industry = 'Oil and gas'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Oil and gas, Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the headquarters that have both a company in the banking and 'oil and gas' industries?", "output": "select headquarters from company where main_industry = 'Banking' intersect select headquarters from company where main_industry = 'Oil and gas'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show all headquarters without a company in banking industry.", "output": "select headquarters from company except select headquarters from company where main_industry = 'Banking'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the headquarters without companies that are in the banking industry?", "output": "select headquarters from company except select headquarters from company where main_industry = 'Banking'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show the company name with the number of gas station.", "output": "select t2.company, count(*) from station_company as t1 join company as t2 on t1.company_id = t2.company_id group by t1.company_id"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "For each company id, what are the companies and how many gas stations does each one operate?", "output": "select t2.company, count(*) from station_company as t1 join company as t2 on t1.company_id = t2.company_id group by t1.company_id"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show company name and main industry without a gas station.", "output": "select company, main_industry from company where company_id not in (select company_id from station_company)"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the main industries of the companies without gas stations and what are the companies?", "output": "select company, main_industry from company where company_id not in (select company_id from station_company)"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The company contains values such as ExxonMobil. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show the manager name for gas stations belonging to the ExxonMobil company.", "output": "select t3.manager_name from station_company as t1 join company as t2 on t1.company_id = t2.company_id join gas_station as t3 on t1.station_id = t3.station_id where t2.company = 'ExxonMobil'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The company contains values such as ExxonMobil. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the names of the managers for gas stations that are operated by the ExxonMobil company?", "output": "select t3.manager_name from station_company as t1 join company as t2 on t1.company_id = t2.company_id join gas_station as t3 on t1.station_id = t3.station_id where t2.company = 'ExxonMobil'"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show all locations where a gas station for company with market value greater than 100 is located.", "output": "select t3.location from station_company as t1 join company as t2 on t1.company_id = t2.company_id join gas_station as t3 on t1.station_id = t3.station_id where t2.market_value > 100"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the locations that have gas stations owned by a company with a market value greater than 100?", "output": "select t3.location from station_company as t1 join company as t2 on t1.company_id = t2.company_id join gas_station as t3 on t1.station_id = t3.station_id where t2.market_value > 100"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "Show the manager name with most number of gas stations opened after 2000.", "output": "select manager_name from gas_station where open_year > 2000 group by manager_name order by count(*) desc limit 1"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What is the name of the manager with the most gas stations that opened after 2000?", "output": "select manager_name from gas_station where open_year > 2000 group by manager_name order by count(*) desc limit 1"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "order all gas station locations by the opening year.", "output": "select location from gas_station order by open_year"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the locations of all the gas stations ordered by opening year?", "output": "select location from gas_station order by open_year"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.", "output": "select rank, company, market_value from company where main_industry = 'Banking' order by sales_billion, profits_billion"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. The main_industry contains values such as Banking. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?", "output": "select rank, company, market_value from company where main_industry = 'Banking' order by sales_billion, profits_billion"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.", "output": "select t3.location, t3.representative_name from station_company as t1 join company as t2 on t1.company_id = t2.company_id join gas_station as t3 on t1.station_id = t3.station_id order by t2.assets_billion desc limit 3"}, {"instruction": "gas_company contains tables such as company, gas_station, station_company. Table company has columns such as company_id, rank, company, headquarters, main_industry, sales_billion, profits_billion, assets_billion, market_value. company_id is the primary key. Table gas_station has columns such as station_id, open_year, location, manager_name, vice_manager_name, representative_name. station_id is the primary key. Table station_company has columns such as station_id, company_id, rank_of_the_year. station_id is the primary key. The company_id of station_company is the foreign key of company_id of company. The station_id of station_company is the foreign key of station_id of gas_station.", "input": "What are the locations and representatives' names of the gas stations owned by the companies with the 3 largest amounts of assets?", "output": "select t3.location, t3.representative_name from station_company as t1 join company as t2 on t1.company_id = t2.company_id join gas_station as t3 on t1.station_id = t3.station_id order by t2.assets_billion desc limit 3"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "How many regions do we have?", "output": "select count(*) from region"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Count the number of regions.", "output": "select count(*) from region"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show all distinct region names ordered by their labels.", "output": "select distinct region_name from region order by label"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What are the different region names, ordered by labels?", "output": "select distinct region_name from region order by label"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "How many parties do we have?", "output": "select count(distinct party_name) from party"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Count the number of different parties.", "output": "select count(distinct party_name) from party"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show the ministers and the time they took and left office, listed by the time they left office.", "output": "select minister, took_office, left_office from party order by left_office"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?", "output": "select minister, took_office, left_office from party order by left_office"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show the minister who took office after 1961 or before 1959.", "output": "select minister from party where took_office > 1961 or took_office < 1959"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Who are the ministers who took office after 1961 or before 1959?", "output": "select minister from party where took_office > 1961 or took_office < 1959"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. The party_name contains values such as Progress Party. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show all ministers who do not belong to Progress Party.", "output": "select minister from party where party_name != 'Progress Party'"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. The party_name contains values such as Progress Party. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Which ministers are not a part of the Progress Party?", "output": "select minister from party where party_name != 'Progress Party'"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show all ministers and parties they belong to in descending order of the time they took office.", "output": "select minister, party_name from party order by took_office desc"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Who are the ministers and what parties do they belong to, listed descending by the times they took office?", "output": "select minister, party_name from party order by took_office desc"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Return the minister who left office at the latest time.", "output": "select minister from party order by left_office desc limit 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Which minister left office the latest?", "output": "select minister from party order by left_office desc limit 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "List member names and their party names.", "output": "select t1.member_name, t2.party_name from member as t1 join party as t2 on t1.party_id = t2.party_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What are the names of members and their corresponding parties?", "output": "select t1.member_name, t2.party_name from member as t1 join party as t2 on t1.party_id = t2.party_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show all party names and the number of members in each party.", "output": "select t2.party_name, count(*) from member as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "How many members are in each party?", "output": "select t2.party_name, count(*) from member as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What is the name of party with most number of members?", "output": "select t2.party_name from member as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id order by count(*) desc limit 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Return the name of the party with the most members.", "output": "select t2.party_name from member as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id order by count(*) desc limit 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show all party names and their region names.", "output": "select t1.party_name, t2.region_name from party as t1 join region as t2 on t1.region_id = t2.region_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What are the names of parties and their respective regions?", "output": "select t1.party_name, t2.region_name from party as t1 join region as t2 on t1.region_id = t2.region_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show names of parties that does not have any members.", "output": "select party_name from party where party_id not in (select party_id from member)"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What are the names of parties that have no members?", "output": "select party_name from party where party_id not in (select party_id from member)"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show the member names which are in both the party with id 3 and the party with id 1.", "output": "select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Which member names are shared among members in the party with the id 3 and the party with the id 1?", "output": "select member_name from member where party_id = 3 intersect select member_name from member where party_id = 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. The party_name contains values such as Progress Party. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show member names that are not in the Progress Party.", "output": "select t1.member_name from member as t1 join party as t2 on t1.party_id = t2.party_id where t2.party_name != \"Progress Party\""}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. The party_name contains values such as Progress Party. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Which member names corresponding to members who are not in the Progress Party?", "output": "select t1.member_name from member as t1 join party as t2 on t1.party_id = t2.party_id where t2.party_name != \"Progress Party\""}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "How many party events do we have?", "output": "select count(*) from party_events"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Count the number of party events.", "output": "select count(*) from party_events"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show party names and the number of events for each party.", "output": "select t2.party_name, count(*) from party_events as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "How many events are there for each party?", "output": "select t2.party_name, count(*) from party_events as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Show all member names who are not in charge of any event.", "output": "select member_name from member except select t1.member_name from member as t1 join party_events as t2 on t1.member_id = t2.member_in_charge_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What are the names of members who are not in charge of any events?", "output": "select member_name from member except select t1.member_name from member as t1 join party_events as t2 on t1.member_id = t2.member_in_charge_id"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What are the names of parties with at least 2 events?", "output": "select t2.party_name from party_events as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id having count(*) >= 2"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Return the names of parties that have two or more events.", "output": "select t2.party_name from party_events as t1 join party as t2 on t1.party_id = t2.party_id group by t1.party_id having count(*) >= 2"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "What is the name of member in charge of greatest number of events?", "output": "select t1.member_name from member as t1 join party_events as t2 on t1.member_id = t2.member_in_charge_id group by t2.member_in_charge_id order by count(*) desc limit 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Return the name of the member who is in charge of the most events.", "output": "select t1.member_name from member as t1 join party_events as t2 on t1.member_id = t2.member_in_charge_id group by t2.member_in_charge_id order by count(*) desc limit 1"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "find the event names that have more than 2 records.", "output": "select event_name from party_events group by event_name having count(*) > 2"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Which event names were used more than twice for party events?", "output": "select event_name from party_events group by event_name having count(*) > 2"}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. The region_name contains values such as United Kingdom. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "How many Annual Meeting events happened in the United Kingdom region?", "output": "select count(*) from region as t1 join party as t2 on t1.region_id = t2.region_id join party_events as t3 on t2.party_id = t3.party_id where t1.region_name = \"United Kingdom\" and t3.event_name = \"Annaual Meeting\""}, {"instruction": "party_people contains tables such as region, party, member, party_events. Table region has columns such as region_id, region_name, date, label, format, catalogue. region_id is the primary key. The region_name contains values such as United Kingdom. Table party has columns such as party_id, minister, took_office, left_office, region_id, party_name. party_id is the primary key. Table member has columns such as member_id, member_name, party_id, in_office. member_id is the primary key. Table party_events has columns such as event_id, event_name, party_id, member_in_charge_id. event_id is the primary key. The region_id of party is the foreign key of region_id of region. The party_id of member is the foreign key of party_id of party. The member_in_charge_id of party_events is the foreign key of member_id of member. The party_id of party_events is the foreign key of party_id of party.", "input": "Count the number of Annual Meeting events that took place in the region of the United Kingdom.", "output": "select count(*) from region as t1 join party as t2 on t1.region_id = t2.region_id join party_events as t3 on t2.party_id = t3.party_id where t1.region_name = \"United Kingdom\" and t3.event_name = \"Annaual Meeting\""}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "How many pilots are there?", "output": "select count(*) from pilot"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "List the names of pilots in ascending order of rank.", "output": "select pilot_name from pilot order by rank asc"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "What are the positions and teams of pilots?", "output": "select position, team from pilot"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "List the distinct positions of pilots older than 30.", "output": "select distinct position from pilot where age > 30"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. The team contains values such as Bradley, Fordham. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show the names of pilots from team \"Bradley\" or \"Fordham\".", "output": "select pilot_name from pilot where team = \"Bradley\" or team = \"Fordham\""}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "What is the joined year of the pilot of the highest rank?", "output": "select join_year from pilot order by rank asc limit 1"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.", "output": "select nationality, count(*) from pilot group by nationality"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show the most common nationality of pilots.", "output": "select nationality from pilot group by nationality order by count(*) desc limit 1"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show the pilot positions that have both pilots joining after year 2005 and pilots joining before 2000.", "output": "select position from pilot where join_year < 2000 intersect select position from pilot where join_year > 2005"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show the names of pilots and models of aircrafts they have flied with.", "output": "select t3.pilot_name, t2.model from pilot_record as t1 join aircraft as t2 on t1.aircraft_id = t2.aircraft_id join pilot as t3 on t1.pilot_id = t3.pilot_id"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show the names of pilots and fleet series of the aircrafts they have flied with in ascending order of the rank of the pilot.", "output": "select t3.pilot_name, t2.fleet_series from pilot_record as t1 join aircraft as t2 on t1.aircraft_id = t2.aircraft_id join pilot as t3 on t1.pilot_id = t3.pilot_id order by t3.rank"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show the fleet series of the aircrafts flied by pilots younger than 34", "output": "select t2.fleet_series from pilot_record as t1 join aircraft as t2 on t1.aircraft_id = t2.aircraft_id join pilot as t3 on t1.pilot_id = t3.pilot_id where t3.age < 34"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show the names of pilots and the number of records they have.", "output": "select t2.pilot_name, count(*) from pilot_record as t1 join pilot as t2 on t1.pilot_id = t2.pilot_id group by t2.pilot_name"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "Show names of pilots that have more than one record.", "output": "select t2.pilot_name, count(*) from pilot_record as t1 join pilot as t2 on t1.pilot_id = t2.pilot_id group by t2.pilot_name having count(*) > 1"}, {"instruction": "pilot_record contains tables such as aircraft, pilot, pilot_record. Table aircraft has columns such as aircraft_id, order_year, manufacturer, model, fleet_series, powertrain, fuel_propulsion. aircraft_id is the primary key. Table pilot has columns such as pilot_id, pilot_name, rank, age, nationality, position, join_year, team. pilot_id is the primary key. Table pilot_record has columns such as record_id, pilot_id, aircraft_id, date. pilot_id is the primary key. The aircraft_id of pilot_record is the foreign key of aircraft_id of aircraft. The pilot_id of pilot_record is the foreign key of pilot_id of pilot.", "input": "List the names of pilots that do not have any record.", "output": "select pilot_name from pilot where pilot_id not in (select pilot_id from pilot_record)"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What document status codes do we have?", "output": "select document_status_code from ref_document_status;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. The document_status_code contains values such as working. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. The document_status_code contains values such as working. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the description of document status code 'working'?", "output": "select document_status_description from ref_document_status where document_status_code = \"working\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What document type codes do we have?", "output": "select document_type_code from ref_document_types;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. The document_type_code contains values such as Paper. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. The document_type_code contains values such as Paper. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the description of document type 'Paper'?", "output": "select document_type_description from ref_document_types where document_type_code = \"Paper\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What are the shipping agent names?", "output": "select shipping_agent_name from ref_shipping_agents;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. The shipping_agent_name contains values such as UPS. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the shipping agent code of shipping agent UPS?", "output": "select shipping_agent_code from ref_shipping_agents where shipping_agent_name = \"UPS\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What are all role codes?", "output": "select role_code from roles;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as ED. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. The role_code contains values such as ED. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the description of role code ED?", "output": "select role_description from roles where role_code = \"ED\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "How many employees do we have?", "output": "select count(*) from employees;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. The employee_name contains values such as Koby. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the role of the employee named Koby?", "output": "select t1.role_description from roles as t1 join employees as t2 on t1.role_code = t2.role_code where t2.employee_name = \"Koby\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List all document ids and receipt dates of documents.", "output": "select document_id, receipt_date from documents;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "How many employees does each role have? List role description, id and number of employees.", "output": "select t1.role_description, t2.role_code, count(*) from roles as t1 join employees as t2 on t1.role_code = t2.role_code group by t2.role_code;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List roles that have more than one employee. List the role description and number of employees.", "output": "select roles.role_description, count(employees.employee_id) from roles join employees on employees.role_code = roles.role_code group by employees.role_code having count(employees.employee_id) > 1;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the document status description of the document with id 1?", "output": "select ref_document_status.document_status_description from ref_document_status join documents on documents.document_status_code = ref_document_status.document_status_code where documents.document_id = 1;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. The document_status_code contains values such as done. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. The document_status_code contains values such as done. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "How many documents have the status code done?", "output": "select count(*) from documents where document_status_code = \"done\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List the document type code for the document with the id 2.", "output": "select document_type_code from documents where document_id = 2;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. The document_type_code contains values such as Paper. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. The document_status_code contains values such as done. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. The document_status_code contains values such as done.The document_type_code contains values such as Paper. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List the document ids for any documents with the status code done and the type code paper.", "output": "select document_id from documents where document_status_code = \"done\" and document_type_code = \"Paper\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the name of the shipping agent of the document with id 2?", "output": "select ref_shipping_agents.shipping_agent_name from ref_shipping_agents join documents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where documents.document_id = 2;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. The shipping_agent_name contains values such as USPS. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "How many documents were shipped by USPS?", "output": "select count(*) from ref_shipping_agents join documents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where ref_shipping_agents.shipping_agent_name = \"USPS\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "Which shipping agent shipped the most documents? List the shipping agent name and the number of documents.", "output": "select ref_shipping_agents.shipping_agent_name, count(documents.document_id) from ref_shipping_agents join documents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code group by ref_shipping_agents.shipping_agent_code order by count(documents.document_id) desc limit 1;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the receipt date of the document with id 3?", "output": "select receipt_date from documents where document_id = 3;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. The document_status_description contains values such as mailed. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What address was the document with id 4 mailed to?", "output": "select addresses.address_details from addresses join documents_mailed on documents_mailed.mailed_to_address_id = addresses.address_id where document_id = 4;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is the mail date of the document with id 7?", "output": "select mailing_date from documents_mailed where document_id = 7;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. The document_type_code contains values such as Paper. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. The document_status_code contains values such as done. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. The shipping_agent_name contains values such as USPS. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. The document_status_code contains values such as done.The document_type_code contains values such as Paper. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.", "output": "select document_id from documents where document_status_code = \"done\" and document_type_code = \"Paper\" except select document_id from documents join ref_shipping_agents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where ref_shipping_agents.shipping_agent_name = \"USPS\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. The document_type_code contains values such as Paper. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. The document_status_code contains values such as done. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. The shipping_agent_name contains values such as USPS. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. The document_status_code contains values such as done.The document_type_code contains values such as Paper. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.", "output": "select document_id from documents where document_status_code = \"done\" and document_type_code = \"Paper\" intersect select document_id from documents join ref_shipping_agents on documents.shipping_agent_code = ref_shipping_agents.shipping_agent_code where ref_shipping_agents.shipping_agent_name = \"USPS\";"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "What is draft detail of the document with id 7?", "output": "select draft_details from document_drafts where document_id = 7;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "How many draft copies does the document with id 2 have?", "output": "select count(*) from draft_copies where document_id = 2;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "Which document has the most draft copies? List its document id and number of draft copies.", "output": "select document_id, count(copy_number) from draft_copies group by document_id order by count(copy_number) desc limit 1;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "Which documents have more than 1 draft copies? List document id and number of draft copies.", "output": "select document_id, count(*) from draft_copies group by document_id having count(*) > 1;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List all employees in the circulation history of the document with id 1. List the employee's name.", "output": "select employees.employee_name from employees join circulation_history on circulation_history.employee_id = employees.employee_id where circulation_history.document_id = 1;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "List the employees who have not showed up in any circulation history of documents. List the employee's name.", "output": "select employee_name from employees except select employees.employee_name from employees join circulation_history on circulation_history.employee_id = employees.employee_id"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "Which employee has showed up in most circulation history documents. List the employee's name and the number of drafts and copies.", "output": "select employees.employee_name, count(*) from employees join circulation_history on circulation_history.employee_id = employees.employee_id group by circulation_history.document_id, circulation_history.draft_number, circulation_history.copy_number order by count(*) desc limit 1;"}, {"instruction": "cre_Doc_Control_Systems contains tables such as ref_document_types, roles, addresses, ref_document_status, ref_shipping_agents, documents, employees, document_drafts, draft_copies, circulation_history, documents_mailed. Table ref_document_types has columns such as document_type_code, document_type_description. document_type_code is the primary key. Table roles has columns such as role_code, role_description. role_code is the primary key. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table ref_document_status has columns such as document_status_code, document_status_description. document_status_code is the primary key. Table ref_shipping_agents has columns such as shipping_agent_code, shipping_agent_name, shipping_agent_description. shipping_agent_code is the primary key. Table documents has columns such as document_id, document_status_code, document_type_code, shipping_agent_code, receipt_date, receipt_number, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, other_details. employee_id is the primary key. Table document_drafts has columns such as document_id, draft_number, draft_details. document_id is the primary key. Table draft_copies has columns such as document_id, draft_number, copy_number. document_id is the primary key. Table circulation_history has columns such as document_id, draft_number, copy_number, employee_id. document_id is the primary key. Table documents_mailed has columns such as document_id, mailed_to_address_id, mailing_date. document_id is the primary key. The shipping_agent_code of documents is the foreign key of shipping_agent_code of ref_shipping_agents. The document_status_code of documents is the foreign key of document_status_code of ref_document_status. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_drafts is the foreign key of document_id of documents. The document_id of draft_copies is the foreign key of document_id of document_drafts. The draft_number of draft_copies is the foreign key of draft_number of document_drafts. The employee_id of circulation_history is the foreign key of employee_id of employees. The document_id of circulation_history is the foreign key of document_id of draft_copies. The draft_number of circulation_history is the foreign key of draft_number of draft_copies. The copy_number of circulation_history is the foreign key of copy_number of draft_copies. The mailed_to_address_id of documents_mailed is the foreign key of address_id of addresses. The document_id of documents_mailed is the foreign key of document_id of documents.", "input": "For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees.", "output": "select document_id, count(distinct employee_id) from circulation_history group by document_id;"}, {"instruction": "company_1 contains tables such as works_on, employee, department, project, dependent, dept_locations. Table works_on has columns such as essn, pno, hours. essn is the primary key. Table employee has columns such as fname, minit, lname, ssn, bdate, address, sex, salary, super_ssn, dno. ssn is the primary key. Table department has columns such as dname, dnumber, mgr_ssn, mgr_start_date. dnumber is the primary key. Table project has columns such as pname, pnumber, plocation, dnum. pnumber is the primary key. Table dependent has columns such as essn, dependent_name, sex, bdate, relationship. essn is the primary key. Table dept_locations has columns such as dnumber, dlocation. dnumber is the primary key.", "input": "List all department names ordered by their starting date.", "output": "select dname from department order by mgr_start_date"}, {"instruction": "company_1 contains tables such as works_on, employee, department, project, dependent, dept_locations. Table works_on has columns such as essn, pno, hours. essn is the primary key. Table employee has columns such as fname, minit, lname, ssn, bdate, address, sex, salary, super_ssn, dno. ssn is the primary key. Table department has columns such as dname, dnumber, mgr_ssn, mgr_start_date. dnumber is the primary key. Table project has columns such as pname, pnumber, plocation, dnum. pnumber is the primary key. Table dependent has columns such as essn, dependent_name, sex, bdate, relationship. essn is the primary key. The relationship contains values such as Spouse. Table dept_locations has columns such as dnumber, dlocation. dnumber is the primary key.", "input": "find all dependent names who have a spouse relation with some employee.", "output": "select dependent_name from dependent where relationship = 'Spouse'"}, {"instruction": "company_1 contains tables such as works_on, employee, department, project, dependent, dept_locations. Table works_on has columns such as essn, pno, hours. essn is the primary key. Table employee has columns such as fname, minit, lname, ssn, bdate, address, sex, salary, super_ssn, dno. ssn is the primary key. Table department has columns such as dname, dnumber, mgr_ssn, mgr_start_date. dnumber is the primary key. Table project has columns such as pname, pnumber, plocation, dnum. pnumber is the primary key. Table dependent has columns such as essn, dependent_name, sex, bdate, relationship. essn is the primary key. Table dept_locations has columns such as dnumber, dlocation. dnumber is the primary key.", "input": "how many female dependents are there?", "output": "select count(*) from dependent where sex = 'F'"}, {"instruction": "company_1 contains tables such as works_on, employee, department, project, dependent, dept_locations. Table works_on has columns such as essn, pno, hours. essn is the primary key. Table employee has columns such as fname, minit, lname, ssn, bdate, address, sex, salary, super_ssn, dno. ssn is the primary key. Table department has columns such as dname, dnumber, mgr_ssn, mgr_start_date. dnumber is the primary key. Table project has columns such as pname, pnumber, plocation, dnum. pnumber is the primary key. The plocation contains values such as Houston. Table dependent has columns such as essn, dependent_name, sex, bdate, relationship. essn is the primary key. Table dept_locations has columns such as dnumber, dlocation. dnumber is the primary key. The dlocation contains values such as Houston.", "input": "Find the names of departments that are located in Houston.", "output": "select t1.dname from department as t1 join dept_locations as t2 on t1.dnumber = t2.dnumber where t2.dlocation = 'Houston'"}, {"instruction": "company_1 contains tables such as works_on, employee, department, project, dependent, dept_locations. Table works_on has columns such as essn, pno, hours. essn is the primary key. Table employee has columns such as fname, minit, lname, ssn, bdate, address, sex, salary, super_ssn, dno. ssn is the primary key. Table department has columns such as dname, dnumber, mgr_ssn, mgr_start_date. dnumber is the primary key. Table project has columns such as pname, pnumber, plocation, dnum. pnumber is the primary key. Table dependent has columns such as essn, dependent_name, sex, bdate, relationship. essn is the primary key. Table dept_locations has columns such as dnumber, dlocation. dnumber is the primary key.", "input": "Return the first names and last names of employees who earn more than 30000 in salary.", "output": "select fname, lname from employee where salary > 30000"}, {"instruction": "company_1 contains tables such as works_on, employee, department, project, dependent, dept_locations. Table works_on has columns such as essn, pno, hours. essn is the primary key. Table employee has columns such as fname, minit, lname, ssn, bdate, address, sex, salary, super_ssn, dno. ssn is the primary key. Table department has columns such as dname, dnumber, mgr_ssn, mgr_start_date. dnumber is the primary key. Table project has columns such as pname, pnumber, plocation, dnum. pnumber is the primary key. Table dependent has columns such as essn, dependent_name, sex, bdate, relationship. essn is the primary key. Table dept_locations has columns such as dnumber, dlocation. dnumber is the primary key.", "input": "Find the number of employees of each gender whose salary is lower than 50000.", "output": "select count(*), sex from employee where salary < 50000 group by sex"}, {"instruction": "company_1 contains tables such as works_on, employee, department, project, dependent, dept_locations. Table works_on has columns such as essn, pno, hours. essn is the primary key. Table employee has columns such as fname, minit, lname, ssn, bdate, address, sex, salary, super_ssn, dno. ssn is the primary key. Table department has columns such as dname, dnumber, mgr_ssn, mgr_start_date. dnumber is the primary key. Table project has columns such as pname, pnumber, plocation, dnum. pnumber is the primary key. Table dependent has columns such as essn, dependent_name, sex, bdate, relationship. essn is the primary key. Table dept_locations has columns such as dnumber, dlocation. dnumber is the primary key.", "input": "list the first and last names, and the addresses of all employees in the ascending order of their birth date.", "output": "select fname, lname, address from employee order by bdate"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. The service_type_code contains values such as Marriage. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "what are the event details of the services that have the type code 'Marriage'?", "output": "select t1.event_details from events as t1 join services as t2 on t1.service_id = t2.service_id where t2.service_type_code = 'Marriage'"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "What are the ids and details of events that have more than one participants?", "output": "select t1.event_id, t1.event_details from events as t1 join participants_in_events as t2 on t1.event_id = t2.event_id group by t1.event_id having count(*) > 1"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "How many events have each participants attended? List the participant id, type and the number.", "output": "select t1.participant_id, t1.participant_type_code, count(*) from participants as t1 join participants_in_events as t2 on t1.participant_id = t2.participant_id group by t1.participant_id"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "What are all the the participant ids, type code and details?", "output": "select participant_id, participant_type_code, participant_details from participants"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Organizer, Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "How many participants belong to the type 'Organizer'?", "output": "select count(*) from participants where participant_type_code = 'Organizer'"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "List the type of the services in alphabetical order.", "output": "select service_type_code from services order by service_type_code"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "List the service id and details for the events.", "output": "select service_id, event_details from events"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "How many events had participants whose details had the substring 'Dr.'", "output": "select count(*) from participants as t1 join participants_in_events as t2 on t1.participant_id = t2.participant_id where t1.participant_details like '%dr.%'"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "What is the most common participant type?", "output": "select participant_type_code from participants group by participant_type_code order by count(*) desc limit 1"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "Which service id and type has the least number of participants?", "output": "select t3.service_id, t4.service_type_code from participants as t1 join participants_in_events as t2 on t1.participant_id = t2.participant_id join events as t3 on t2.event_id = t3.event_id join services as t4 on t3.service_id = t4.service_id group by t3.service_id order by count(*) asc limit 1"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "What is the id of the event with the most participants?", "output": "select event_id from participants_in_events group by event_id order by count(*) desc limit 1"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant.The participant_details contains values such as Kenyatta Kuhn. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "Which events id does not have any participant with detail 'Kenyatta Kuhn'?", "output": "select event_id from events except select t1.event_id from participants_in_events as t1 join participants as t2 on t1.participant_id = t2.participant_id where participant_details = 'Kenyatta Kuhn'"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "Which services type had both successful and failure event details?", "output": "select t1.service_type_code from services as t1 join events as t2 on t1.service_id = t2.service_id where t2.event_details = 'Success' intersect select t1.service_type_code from services as t1 join events as t2 on t1.service_id = t2.service_id where t2.event_details = 'Fail'"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "How many events did not have any participants?", "output": "select count(*) from events where event_id not in (select event_id from participants_in_events)"}, {"instruction": "local_govt_in_alabama contains tables such as services, participants, events, participants_in_events. Table services has columns such as service_id, service_type_code. service_id is the primary key. Table participants has columns such as participant_id, participant_type_code, participant_details. participant_id is the primary key. The participant_type_code contains values such as Participant. Table events has columns such as event_id, service_id, event_details. event_id is the primary key. Table participants_in_events has columns such as event_id, participant_id. event_id is the primary key. The service_id of events is the foreign key of service_id of services. The event_id of participants_in_events is the foreign key of event_id of events. The participant_id of participants_in_events is the foreign key of participant_id of participants.", "input": "What are all the distinct participant ids who attended any events?", "output": "select count(distinct participant_id) from participants_in_events"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the name of the race held most recently?", "output": "select name from races order by date desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the name of the race that occurred most recently?", "output": "select name from races order by date desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the name and date of the most recent race?", "output": "select name, date from races order by date desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the name and date of the race that occurred most recently?", "output": "select name, date from races order by date desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the names of all races held in 2017.", "output": "select name from races where year = 2017"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of all the races that occurred in the year 2017?", "output": "select name from races where year = 2017"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the distinct names of all races held between 2014 and 2017?", "output": "select distinct name from races where year between 2014 and 2017"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the unique names of all race held between 2014 and 2017?", "output": "select distinct name from races where year between 2014 and 2017"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "List the forename and surname of all distinct drivers who once had laptime less than 93000 milliseconds?", "output": "select distinct t1.forename, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid where t2.milliseconds < 93000"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the forenames and surnames of all unique drivers who had a lap time of less than 93000 milliseconds?", "output": "select distinct t1.forename, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid where t2.milliseconds < 93000"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?", "output": "select distinct t1.driverid, t1.nationality from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid where t2.milliseconds > 100000"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the different driver ids and nationalities of all drivers who had a laptime of more than 100000 milliseconds?", "output": "select distinct t1.driverid, t1.nationality from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid where t2.milliseconds > 100000"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the forename and surname of the driver who has the smallest laptime?", "output": "select t1.forename, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid order by t2.milliseconds limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the forename and surname of the driver with the shortest laptime?", "output": "select t1.forename, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid order by t2.milliseconds limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id and family name of the driver who has the longest laptime?", "output": "select t1.driverid, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid order by t2.milliseconds desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id and last name of the driver with the longest laptime?", "output": "select t1.driverid, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid order by t2.milliseconds desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id, forname and surname of the driver who had the first position in terms of laptime at least twice?", "output": "select t1.driverid, t1.forename, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid where position = '1' group by t1.driverid having count(*) >= 2"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id, first name, and last name of the driver who was in the first position for laptime at least twice?", "output": "select t1.driverid, t1.forename, t1.surname from drivers as t1 join laptimes as t2 on t1.driverid = t2.driverid where position = '1' group by t1.driverid having count(*) >= 2"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Australia. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Australian Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as Australian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae.The nationality contains values such as Australian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "How many drivers participated in the race Australian Grand Prix held in 2009?", "output": "select count(*) from results as t1 join races as t2 on t1.raceid = t2.raceid where t2.name = \"Australian grand Prix\" and year = 2009"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Australia. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Australian Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as Australian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Australian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "How many drivers were in the Australian Grand Prix held in 2009?", "output": "select count(*) from results as t1 join races as t2 on t1.raceid = t2.raceid where t2.name = \"Australian grand Prix\" and year = 2009"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "How many drivers did not participate in the races held in 2009?", "output": "select count(distinct driverid) from results where raceid not in( select raceid from races where year != 2009 )"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "How many drivers did not race in 2009?", "output": "select count(distinct driverid) from results where raceid not in( select raceid from races where year != 2009 )"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver, lewis.The forename contains values such as Lewis.The surname contains values such as Driver, Lewis. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Give me a list of names and years of races that had any driver whose forename is Lewis?", "output": "select t2.name, t2.year from results as t1 join races as t2 on t1.raceid = t2.raceid join drivers as t3 on t1.driverid = t3.driverid where t3.forename = \"Lewis\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver, lewis.The forename contains values such as Lewis.The surname contains values such as Driver, Lewis. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names and years of all races that had a driver with the last name Lewis?", "output": "select t2.name, t2.year from results as t1 join races as t2 on t1.raceid = t2.raceid join drivers as t3 on t1.driverid = t3.driverid where t3.forename = \"Lewis\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Germany. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as German. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as German. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the forename and surname of drivers whose nationality is German?", "output": "select forename, surname from drivers where nationality = \"German\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Germany. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as German. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as German. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the first and last name of all the German drivers?", "output": "select forename, surname from drivers where nationality = \"German\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Australia. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Australian Grand Prix, Chinese Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as Australian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Australian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?", "output": "select t2.driverid, t3.forename from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Australian grand Prix\" intersect select t2.driverid, t3.forename from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Chinese grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Australia. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Australian Grand Prix, Chinese Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as Australian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Australian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id and first name of all the drivers who participated in the Australian Grand Prix and the Chinese Grand Prix?", "output": "select t2.driverid, t3.forename from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Australian grand Prix\" intersect select t2.driverid, t3.forename from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Chinese grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Australia. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Australian Grand Prix, Chinese Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as Australian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Australian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?", "output": "select t3.forename, t3.surname from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Australian grand Prix\" except select t3.forename, t3.surname from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Chinese grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Australia. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Australian Grand Prix, Chinese Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The nationality contains values such as Australian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Australian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?", "output": "select t3.forename, t3.surname from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Australian grand Prix\" except select t3.forename, t3.surname from races as t1 join results as t2 on t1.raceid = t2.raceid join drivers as t3 on t2.driverid = t3.driverid where t1.name = \"Chinese grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find all the forenames of distinct drivers who was in position 1 as standing and won?", "output": "select distinct t1.forename from drivers as t1 join driverstandings as t2 on t1.driverid = t2.driverid where t2.position = 1 and t2.wins = 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are all the different first names of the drivers who are in position as standing and won?", "output": "select distinct t1.forename from drivers as t1 join driverstandings as t2 on t1.driverid = t2.driverid where t2.position = 1 and t2.wins = 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?", "output": "select distinct t1.forename from drivers as t1 join driverstandings as t2 on t1.driverid = t2.driverid where t2.position = 1 and t2.wins = 1 and t2.points > 20"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the first names of the different drivers who won in position 1 as driver standing and had more than 20 points?", "output": "select distinct t1.forename from drivers as t1 join driverstandings as t2 on t1.driverid = t2.driverid where t2.position = 1 and t2.wins = 1 and t2.points > 20"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the numbers of constructors for different nationalities?", "output": "select count(*), nationality from constructors group by nationality"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "For each nationality, how many different constructors are there?", "output": "select count(*), nationality from constructors group by nationality"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the numbers of races for each constructor id?", "output": "select count(*), constructorid from constructorstandings group by constructorid"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "For each constructor id, how many races are there?", "output": "select count(*), constructorid from constructorstandings group by constructorid"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Spain. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of races that were held after 2017 and the circuits were in the country of Spain?", "output": "select t1.name from races as t1 join circuits as t2 on t1.circuitid = t2.circuitid where t2.country = \"Spain\" and t1.year > 2017"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Spain. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of the races held after 2017 in Spain?", "output": "select t1.name from races as t1 join circuits as t2 on t1.circuitid = t2.circuitid where t2.country = \"Spain\" and t1.year > 2017"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Spain. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the unique names of races that held after 2000 and the circuits were in Spain?", "output": "select distinct t1.name from races as t1 join circuits as t2 on t1.circuitid = t2.circuitid where t2.country = \"Spain\" and t1.year > 2000"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Spain. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of all races held after 2000 in Spain?", "output": "select distinct t1.name from races as t1 join circuits as t2 on t1.circuitid = t2.circuitid where t2.country = \"Spain\" and t1.year > 2000"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.", "output": "select distinct driverid, stop from pitstops where duration < (select max(duration) from pitstops where raceid = 841)"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id and stop number for each driver that has a shorter pit stop than the driver in the race with id 841?", "output": "select distinct driverid, stop from pitstops where duration < (select max(duration) from pitstops where raceid = 841)"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?", "output": "select distinct driverid, stop from pitstops where duration > (select min(duration) from pitstops where raceid = 841)"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the different ids and stop durations of all the drivers whose stop lasted longer than the driver in the race with the id 841?", "output": "select distinct driverid, stop from pitstops where duration > (select min(duration) from pitstops where raceid = 841)"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "List the forenames of all distinct drivers in alphabetical order?", "output": "select distinct forename from drivers order by forename asc"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the first names of all the different drivers in alphabetical order?", "output": "select distinct forename from drivers order by forename asc"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "List the names of all distinct races in reversed lexicographic order?", "output": "select distinct name from races order by name desc"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. The status contains values such as Differential. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the different names of all the races in reverse alphabetical order?", "output": "select distinct name from races order by name desc"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of races held between 2009 and 2011?", "output": "select name from races where year between 2009 and 2011"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of all races held between 2009 and 2011?", "output": "select name from races where year between 2009 and 2011"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The time contains values such as 12:00:00, 09:00:00. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of races held after 12:00:00 or before 09:00:00?", "output": "select name from races where time > \"12:00:00\" or time < \"09:00:00\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The time contains values such as 12:00:00, 09:00:00. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of all races that occurred after 12:00:00 or before 09:00:00?", "output": "select name from races where time > \"12:00:00\" or time < \"09:00:00\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?", "output": "select t1.forename, t1.surname, t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 8 union select t1.forename, t1.surname, t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 5"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the drivers' first names,last names, and ids for all those that had more than 8 stops or participated in more than 5 races?", "output": "select t1.forename, t1.surname, t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 8 union select t1.forename, t1.surname, t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 5"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?", "output": "select t1.surname, t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) = 11 intersect select t1.surname, t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 5"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the last names and ids of all drivers who had 11 pit stops and participated in more than 5 races?", "output": "select t1.surname, t1.driverid from drivers as t1 join pitstops as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) = 11 intersect select t1.surname, t1.driverid from drivers as t1 join results as t2 on t1.driverid = t2.driverid group by t1.driverid having count(*) > 5"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id and last name of the driver who participated in the most races after 2010?", "output": "select t1.driverid, t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid where t3.year > 2010 group by t1.driverid order by count(*) desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id and last name of the driver who participated in the most races after 2010?", "output": "select t1.driverid, t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid where t3.year > 2010 group by t1.driverid order by count(*) desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Malaysia, UK. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The nationality contains values such as Malaysian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Malaysian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of circuits that belong to UK or Malaysia?", "output": "select name from circuits where country = \"UK\" or country = \"Malaysia\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Malaysia, UK. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The nationality contains values such as Malaysian. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Malaysian. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of all the circuits that are in the UK or Malaysia?", "output": "select name from circuits where country = \"UK\" or country = \"Malaysia\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Belgium, France. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Belgium. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the id and location of circuits that belong to France or Belgium?", "output": "select circuitid, location from circuits where country = \"France\" or country = \"Belgium\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The country contains values such as Belgium, France. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Belgium. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the ids and locations of all circuits in France or Belgium?", "output": "select circuitid, location from circuits where country = \"France\" or country = \"Belgium\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The nationality contains values such as Japanese. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Japanese. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the names of Japanese constructors that have once earned more than 5 points?", "output": "select t1.name from constructors as t1 join constructorstandings as t2 on t1.constructorid = t2.constructorid where t1.nationality = \"Japanese\" and t2.points > 5"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The nationality contains values such as Japanese. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The nationality contains values such as Japanese. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the names of all the Japanese constructors that have earned more than 5 points?", "output": "select t1.name from constructors as t1 join constructorstandings as t2 on t1.constructorid = t2.constructorid where t1.nationality = \"Japanese\" and t2.points > 5"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The circuitref contains values such as monaco.The country contains values such as Monaco. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Monaco Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "output": "select avg(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = \"Monaco grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The circuitref contains values such as monaco.The country contains values such as Monaco. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Monaco Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the average fastest lap speed for the Monaco Grand Prix in 2008?", "output": "select avg(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = \"Monaco grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The circuitref contains values such as monaco.The country contains values such as Monaco. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Monaco Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?", "output": "select max(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = \"Monaco grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. The circuitref contains values such as monaco.The country contains values such as Monaco. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. The name contains values such as Monaco Grand Prix. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?", "output": "select max(t2.fastestlapspeed) from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year = 2008 and t1.name = \"Monaco grand Prix\""}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the maximum fastest lap speed in races held after 2004 grouped by race name and ordered by year?", "output": "select max(t2.fastestlapspeed), t1.name, t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. The constructorref contains values such as rae. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "For each race name, What is the maximum fastest lap speed for races after 2004 ordered by year?", "output": "select max(t2.fastestlapspeed), t1.name, t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the average fastest lap speed in races held after 2004 grouped by race name and ordered by year?", "output": "select avg(t2.fastestlapspeed), t1.name, t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as speed.The surname contains values such as Speed. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the average fastest lap speed for races held after 2004, for each race, ordered by year?", "output": "select avg(t2.fastestlapspeed), t1.name, t1.year from races as t1 join results as t2 on t1.raceid = t2.raceid where t1.year > 2014 group by t1.name order by t1.year"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the id, forename and number of races of all drivers who have at least participated in two races?", "output": "select t1.driverid, t1.forename, count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) >= 2"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What is the id, forename, and number of races for all drivers that have participated in at least 2 races?", "output": "select t1.driverid, t1.forename, count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) >= 2"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the driver id and number of races of all drivers who have at most participated in 30 races?", "output": "select t1.driverid, count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) <= 30"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "For each id of a driver who participated in at most 30 races, how many races did they participate in?", "output": "select t1.driverid, count(*) from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid having count(*) <= 30"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver.The surname contains values such as Driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "Find the id and surname of the driver who participated the most number of races?", "output": "select t1.driverid, t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid order by count(*) desc limit 1"}, {"instruction": "formula_1 contains tables such as circuits, races, drivers, status, seasons, constructors, constructorstandings, results, driverstandings, constructorresults, qualifying, pitstops, laptimes. Table circuits has columns such as circuitid, circuitref, name, location, country, lat, lng, alt, url. circuitid is the primary key. Table races has columns such as raceid, year, round, circuitid, name, date, time, url. raceid is the primary key. Table drivers has columns such as driverid, driverref, number, code, forename, surname, dob, nationality, url. driverid is the primary key. The driverref contains values such as driver. Table status has columns such as statusid, status. statusid is the primary key. Table seasons has columns such as year, url. year is the primary key. Table constructors has columns such as constructorid, constructorref, name, nationality, url. constructorid is the primary key. Table constructorstandings has columns such as constructorstandingsid, raceid, constructorid, points, position, positiontext, wins. constructorstandingsid is the primary key. Table results has columns such as resultid, raceid, driverid, constructorid, number, grid, position, positiontext, positionorder, points, laps, time, milliseconds, fastestlap, rank, fastestlaptime, fastestlapspeed, statusid. resultid is the primary key. Table driverstandings has columns such as driverstandingsid, raceid, driverid, points, position, positiontext, wins. driverstandingsid is the primary key. Table constructorresults has columns such as constructorresultsid, raceid, constructorid, points, status. constructorresultsid is the primary key. Table qualifying has columns such as qualifyid, raceid, driverid, constructorid, number, position, q1, q2, q3. qualifyid is the primary key. Table pitstops has columns such as raceid, driverid, stop, lap, time, duration, milliseconds. raceid is the primary key. Table laptimes has columns such as raceid, driverid, lap, position, time, milliseconds. raceid is the primary key. The circuitid of races is the foreign key of circuitid of circuits. The raceid of constructorstandings is the foreign key of raceid of races. The constructorid of constructorstandings is the foreign key of constructorid of constructors. The driverid of results is the foreign key of driverid of drivers. The raceid of results is the foreign key of raceid of races. The constructorid of results is the foreign key of constructorid of constructors. The driverid of driverstandings is the foreign key of driverid of drivers. The raceid of driverstandings is the foreign key of raceid of races. The raceid of constructorresults is the foreign key of raceid of races. The constructorid of constructorresults is the foreign key of constructorid of constructors. The driverid of qualifying is the foreign key of driverid of drivers. The raceid of qualifying is the foreign key of raceid of races. The constructorid of qualifying is the foreign key of constructorid of constructors. The driverid of pitstops is the foreign key of driverid of drivers. The raceid of pitstops is the foreign key of raceid of races. The driverid of laptimes is the foreign key of driverid of drivers. The raceid of laptimes is the foreign key of raceid of races.", "input": "What are the ids and last names of all drivers who participated in the most races?", "output": "select t1.driverid, t1.surname from drivers as t1 join results as t2 on t1.driverid = t2.driverid join races as t3 on t2.raceid = t3.raceid group by t1.driverid order by count(*) desc limit 1"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "How many technicians are there?", "output": "select count(*) from technician"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What is the number of technicians?", "output": "select count(*) from technician"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "List the names of technicians in ascending order of age.", "output": "select name from technician order by age asc"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the names of the technicians by ascending order of age?", "output": "select name from technician order by age asc"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the team and starting year of technicians?", "output": "select team, starting_year from technician"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What is the team and starting year for each technician?", "output": "select team, starting_year from technician"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. The team contains values such as NYY. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "List the name of technicians whose team is not \"NYY\".", "output": "select name from technician where team != \"NYY\""}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. The team contains values such as NYY. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What is the name of the technician whose team is not 'NYY'?", "output": "select name from technician where team != \"NYY\""}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show the name of technicians aged either 36 or 37", "output": "select name from technician where age = 36 or age = 37"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the names of the technicians aged either 36 or 37?", "output": "select name from technician where age = 36 or age = 37"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What is the starting year of the oldest technicians?", "output": "select starting_year from technician order by age desc limit 1"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What is the starting year for the oldest technician?", "output": "select starting_year from technician order by age desc limit 1"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show different teams of technicians and the number of technicians in each team.", "output": "select team, count(*) from technician group by team"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "For each team, how many technicians are there?", "output": "select team, count(*) from technician group by team"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Please show the team that has the most number of technicians.", "output": "select team from technician group by team order by count(*) desc limit 1"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the teams with the most technicians?", "output": "select team from technician group by team order by count(*) desc limit 1"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show the team that have at least two technicians.", "output": "select team from technician group by team having count(*) >= 2"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What is the team with at least 2 technicians?", "output": "select team from technician group by team having count(*) >= 2"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show names of technicians and series of machines they are assigned to repair.", "output": "select t3.name, t2.machine_series from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the names of technicians and the machine series that they repair?", "output": "select t3.name, t2.machine_series from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show names of technicians in ascending order of quality rank of the machine they are assigned.", "output": "select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id order by t2.quality_rank"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the names of the technicians by ascending order of quality rank for the machine they are assigned?", "output": "select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id order by t2.quality_rank"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show names of technicians who are assigned to repair machines with value point more than 70.", "output": "select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id where t2.value_points > 70"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the names of the technicians that are assigned to repair machines with more point values than 70?", "output": "select t3.name from repair_assignment as t1 join machine as t2 on t1.machine_id = t2.machine_id join technician as t3 on t1.technician_id = t3.technician_id where t2.value_points > 70"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show names of technicians and the number of machines they are assigned to repair.", "output": "select t2.name, count(*) from repair_assignment as t1 join technician as t2 on t1.technician_id = t2.technician_id group by t2.name"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the names of the technicians and how many machines are they assigned to repair?", "output": "select t2.name, count(*) from repair_assignment as t1 join technician as t2 on t1.technician_id = t2.technician_id group by t2.name"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "List the names of technicians who have not been assigned to repair machines.", "output": "select name from technician where technician_id not in (select technician_id from repair_assignment)"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the names of the technicians that have not been assigned to repair machines?", "output": "select name from technician where technician_id not in (select technician_id from repair_assignment)"}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. The team contains values such as CLE, CWS. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "Show the starting years shared by technicians from team \"CLE\" and \"CWS\".", "output": "select starting_year from technician where team = \"CLE\" intersect select starting_year from technician where team = \"CWS\""}, {"instruction": "machine_repair contains tables such as repair, machine, technician, repair_assignment. Table repair has columns such as repair_id, name, launch_date, notes. repair_id is the primary key. Table machine has columns such as machine_id, making_year, class, team, machine_series, value_points, quality_rank. machine_id is the primary key. Table technician has columns such as technician_id, name, team, starting_year, age. technician_id is the primary key. The team contains values such as CLE, CWS. Table repair_assignment has columns such as technician_id, repair_id, machine_id. technician_id is the primary key. The machine_id of repair_assignment is the foreign key of machine_id of machine. The repair_id of repair_assignment is the foreign key of repair_id of repair. The technician_id of repair_assignment is the foreign key of technician_id of technician.", "input": "What are the starting years shared by the technicians from the team \"CLE\" or \"CWS\"?", "output": "select starting_year from technician where team = \"CLE\" intersect select starting_year from technician where team = \"CWS\""}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "How many entrepreneurs are there?", "output": "select count(*) from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Count the number of entrepreneurs.", "output": "select count(*) from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "List the companies of entrepreneurs in descending order of money requested.", "output": "select company from entrepreneur order by money_requested desc"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the companies of entrepreneurs, ordered descending by amount of money requested?", "output": "select company from entrepreneur order by money_requested desc"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "List the companies and the investors of entrepreneurs.", "output": "select company, investor from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the companies and investors that correspond to each entrepreneur?", "output": "select company, investor from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What is the average money requested by all entrepreneurs?", "output": "select avg(money_requested) from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the average money requested across all entrepreneurs.", "output": "select avg(money_requested) from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the names of people in ascending order of weight?", "output": "select name from people order by weight asc"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the names of people, ordered by weight ascending.", "output": "select name from people order by weight asc"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the names of entrepreneurs?", "output": "select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the names of entrepreneurs.", "output": "select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. The investor contains values such as Rachel Elnaugh. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the names of entrepreneurs whose investor is not \"Rachel Elnaugh\"?", "output": "select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor != \"Rachel Elnaugh\""}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. The investor contains values such as Rachel Elnaugh. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.", "output": "select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor != \"Rachel Elnaugh\""}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What is the weight of the shortest person?", "output": "select weight from people order by height asc limit 1"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the weight of the shortest person.", "output": "select weight from people order by height asc limit 1"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What is the name of the entrepreneur with the greatest weight?", "output": "select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t2.weight desc limit 1"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the name of the heaviest entrepreneur.", "output": "select t2.name from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t2.weight desc limit 1"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What is the total money requested by entrepreneurs with height more than 1.85?", "output": "select sum(t1.money_requested) from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t2.height > 1.85"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Give the total money requested by entrepreneurs who are taller than 1.85.", "output": "select sum(t1.money_requested) from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t2.height > 1.85"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. The investor contains values such as Simon Woodroffe, Peter Jones. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the dates of birth of entrepreneurs with investor \"Simon Woodroffe\" or \"Peter Jones\"?", "output": "select t2.date_of_birth from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor = \"Simon Woodroffe\" or t1.investor = \"Peter Jones\""}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. The investor contains values such as Simon Woodroffe, Peter Jones. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the dates of birth for entrepreneurs who have either the investor Simon Woodroffe or Peter Jones.", "output": "select t2.date_of_birth from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id where t1.investor = \"Simon Woodroffe\" or t1.investor = \"Peter Jones\""}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the weights of entrepreneurs in descending order of money requested?", "output": "select t2.weight from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested desc"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the weights of entrepreneurs, ordered descending by amount of money requested.", "output": "select t2.weight from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested desc"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the investors of entrepreneurs and the corresponding number of entrepreneurs invested by each investor?", "output": "select investor, count(*) from entrepreneur group by investor"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "How many entrepreneurs correspond to each investor?", "output": "select investor, count(*) from entrepreneur group by investor"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What is the investor that has invested in the most number of entrepreneurs?", "output": "select investor from entrepreneur group by investor order by count(*) desc limit 1"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the investor who have invested in the greatest number of entrepreneurs.", "output": "select investor from entrepreneur group by investor order by count(*) desc limit 1"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the investors that have invested in at least two entrepreneurs?", "output": "select investor from entrepreneur group by investor having count(*) >= 2"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Return the investors who have invested in two or more entrepreneurs.", "output": "select investor from entrepreneur group by investor having count(*) >= 2"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "List the names of entrepreneurs and their companies in descending order of money requested?", "output": "select t2.name, t1.company from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?", "output": "select t2.name, t1.company from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t1.money_requested"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "List the names of people that are not entrepreneurs.", "output": "select name from people where people_id not in (select people_id from entrepreneur)"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the names of people who are not entrepreneurs?", "output": "select name from people where people_id not in (select people_id from entrepreneur)"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.", "output": "select investor from entrepreneur where money_requested > 140000 intersect select investor from entrepreneur where money_requested < 120000"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "What are the investors who have invested in both entrepreneurs who requested more than 140000 and entrepreneurs who requested less than 120000?", "output": "select investor from entrepreneur where money_requested > 140000 intersect select investor from entrepreneur where money_requested < 120000"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "How many distinct companies are there?", "output": "select count(distinct company) from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Count the number of different companies.", "output": "select count(distinct company) from entrepreneur"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Show the company of the tallest entrepreneur.", "output": "select t1.company from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t2.height desc limit 1"}, {"instruction": "entrepreneur contains tables such as entrepreneur, people. Table entrepreneur has columns such as entrepreneur_id, people_id, company, money_requested, investor. entrepreneur_id is the primary key. Table people has columns such as people_id, name, height, weight, date_of_birth. people_id is the primary key. The people_id of entrepreneur is the foreign key of people_id of people.", "input": "Which company was started by the entrepreneur with the greatest height?", "output": "select t1.company from entrepreneur as t1 join people as t2 on t1.people_id = t2.people_id order by t2.height desc limit 1"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "How many perpetrators are there?", "output": "select count(*) from perpetrator"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "List the date of perpetrators in descending order of the number of people killed.", "output": "select date from perpetrator order by killed desc"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "List the number of people injured by perpetrators in ascending order.", "output": "select injured from perpetrator order by injured asc"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What is the average number of people injured by all perpetrators?", "output": "select avg(injured) from perpetrator"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What is the location of the perpetrator with the largest kills.", "output": "select location from perpetrator order by killed desc limit 1"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What are the names of people in ascending order of height?", "output": "select name from people order by height asc"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What are the names of perpetrators?", "output": "select t1.name from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. The country contains values such as China. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What are the names of perpetrators whose country is not \"China\"?", "output": "select t1.name from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id where t2.country != \"China\""}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What is the name of the perpetrator with the biggest weight.", "output": "select t1.name from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id order by t1.weight desc limit 1"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What is the total kills of the perpetrators with height more than 1.84.", "output": "select sum(t2.killed) from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id where t1.height > 1.84"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. The country contains values such as China, Japan. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What are the names of perpetrators in country \"China\" or \"Japan\"?", "output": "select t1.name from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id where t2.country = \"China\" or t2.country = \"Japan\""}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What are the heights of perpetrators in descending order of the number of people they injured?", "output": "select t1.height from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id order by t2.injured desc"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.", "output": "select country, count(*) from perpetrator group by country"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What is the country that has the most perpetrators?", "output": "select country, count(*) from perpetrator group by country order by count(*) desc limit 1"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "What are the countries that have at least two perpetrators?", "output": "select country, count(*) from perpetrator group by country having count(*) >= 2"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "List the names of perpetrators in descending order of the year.", "output": "select t1.name from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id order by t2.year desc"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "List the names of people that are not perpetrators.", "output": "select name from people where people_id not in (select people_id from perpetrator)"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.", "output": "select country from perpetrator where injured > 50 intersect select country from perpetrator where injured < 20"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "How many distinct locations of perpetrators are there?", "output": "select count(distinct location) from perpetrator"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "Show the date of the tallest perpetrator.", "output": "select t2.date from people as t1 join perpetrator as t2 on t1.people_id = t2.people_id order by t1.height desc limit 1"}, {"instruction": "perpetrator contains tables such as perpetrator, people. Table perpetrator has columns such as perpetrator_id, people_id, date, year, location, country, killed, injured. perpetrator_id is the primary key. Table people has columns such as people_id, name, height, weight, home town. people_id is the primary key. The people_id of perpetrator is the foreign key of people_id of people.", "input": "In which year did the most recent crime happen?", "output": "select max(year) from perpetrator;"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Los Angeles.The county contains values such as Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Report the name of all campuses in Los Angeles county.", "output": "select campus from campuses where county = \"Los Angeles\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Los Angeles.The county contains values such as Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campuses are located in the county of Los Angeles?", "output": "select campus from campuses where county = \"Los Angeles\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Chico. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What are the names of all campuses located at Chico?", "output": "select campus from campuses where location = \"Chico\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Chico. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campuses are located in Chico?", "output": "select campus from campuses where location = \"Chico\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find all the campuses opened in 1958.", "output": "select campus from campuses where year = 1958"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What are the campuses that opened in 1958?", "output": "select campus from campuses where year = 1958"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find the name of the campuses opened before 1800.", "output": "select campus from campuses where year < 1800"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campuses opened before 1800?", "output": "select campus from campuses where year < 1800"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Which campus was opened between 1935 and 1939?", "output": "select campus from campuses where year >= 1935 and year <= 1939"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campuses opened between 1935 and 1939?", "output": "select campus from campuses where year >= 1935 and year <= 1939"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as San Francisco, Los Angeles.The county contains values such as San Francisco, Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.", "output": "select campus from campuses where location = \"Northridge\" and county = \"Los Angeles\" union select campus from campuses where location = \"San Francisco\" and county = \"San Francisco\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as San Francisco, Los Angeles.The county contains values such as San Francisco, Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?", "output": "select campus from campuses where location = \"Northridge\" and county = \"Los Angeles\" union select campus from campuses where location = \"San Francisco\" and county = \"San Francisco\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Jose State University.The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the campus fee of \"San Jose State University\" in year 1996?", "output": "select campusfee from campuses as t1 join csu_fees as t2 on t1.id = t2.campus where t1.campus = \"San jose state University\" and t2.year = 1996"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Jose State University.The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the campus fee for San Jose State University in 1996?", "output": "select campusfee from campuses as t1 join csu_fees as t2 on t1.id = t2.campus where t1.campus = \"San jose state University\" and t2.year = 1996"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the campus fee of \"San Francisco State University\" in year 1996?", "output": "select campusfee from campuses as t1 join csu_fees as t2 on t1.id = t2.campus where t1.campus = \"San francisco state University\" and t2.year = 1996"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the campus fee for San Francisco State University in 1996?", "output": "select campusfee from campuses as t1 join csu_fees as t2 on t1.id = t2.campus where t1.campus = \"San francisco state University\" and t2.year = 1996"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find the count of universities whose campus fee is greater than the average campus fee.", "output": "select count(*) from csu_fees where campusfee > (select avg(campusfee) from csu_fees)"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many universities have a campus fee higher than average?", "output": "select count(*) from csu_fees where campusfee > (select avg(campusfee) from csu_fees)"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find the count of universities whose campus fee is greater than the average campus fee.", "output": "select count(*) from csu_fees where campusfee > (select avg(campusfee) from csu_fees)"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many universities have a campus fee greater than the average?", "output": "select count(*) from csu_fees where campusfee > (select avg(campusfee) from csu_fees)"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Los Angeles.The county contains values such as Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Which university is in Los Angeles county and opened after 1950?", "output": "select campus from campuses where county = \"Los Angeles\" and year > 1950"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Los Angeles.The county contains values such as Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campuses are located in Los Angeles county and opened after 1950?", "output": "select campus from campuses where county = \"Los Angeles\" and year > 1950"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Which year has the most degrees conferred?", "output": "select year from degrees group by year order by sum(degrees) desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "In what year was the most degrees conferred?", "output": "select year from degrees group by year order by sum(degrees) desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Which campus has the most degrees conferred in all times?", "output": "select campus from degrees group by campus order by sum(degrees) desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campus has the most degrees conferrred over its entire existence?", "output": "select campus from degrees group by campus order by sum(degrees) desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Which campus has the most faculties in year 2003?", "output": "select t1.campus from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.year = 2003 order by t2.faculty desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campus has the most faculties in 2003?", "output": "select t1.campus from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.year = 2003 order by t2.faculty desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find the average fee on a CSU campus in 1996", "output": "select avg(campusfee) from csu_fees where year = 1996"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the average fee for a CSU campus in the year of 1996?", "output": "select avg(campusfee) from csu_fees where year = 1996"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the average fee on a CSU campus in 2005?", "output": "select avg(campusfee) from csu_fees where year = 2005"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the average fee for a CSU campus in the year of 2005?", "output": "select avg(campusfee) from csu_fees where year = 2005"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "report the total number of degrees granted between 1998 and 2002.", "output": "select t1.campus, sum(t2.degrees) from campuses as t1 join degrees as t2 on t1.id = t2.campus where t2.year >= 1998 and t2.year <= 2002 group by t1.campus"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "how many degrees were conferred between 1998 and 2002?", "output": "select t1.campus, sum(t2.degrees) from campuses as t1 join degrees as t2 on t1.id = t2.campus where t2.year >= 1998 and t2.year <= 2002 group by t1.campus"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The county contains values such as Orange. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "For each Orange county campus, report the number of degrees granted after 2000.", "output": "select t1.campus, sum(t2.degrees) from campuses as t1 join degrees as t2 on t1.id = t2.campus where t1.county = \"Orange\" and t2.year >= 2000 group by t1.campus"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The county contains values such as Orange. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the total number of degrees granted after 2000 for each Orange county campus?", "output": "select t1.campus, sum(t2.degrees) from campuses as t1 join degrees as t2 on t1.id = t2.campus where t1.county = \"Orange\" and t2.year >= 2000 group by t1.campus"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The county contains values such as Orange. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find the names of the campus which has more faculties in 2002 than every campus in Orange county.", "output": "select t1.campus from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.year = 2002 and faculty > (select max(faculty) from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.year = 2002 and t1.county = \"Orange\")"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The county contains values such as Orange. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?", "output": "select t1.campus from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.year = 2002 and faculty > (select max(faculty) from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.year = 2002 and t1.county = \"Orange\")"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?", "output": "select t1.campus from campuses as t1 join enrollments as t2 on t1.id = t2.campus where t2.year = 1956 and totalenrollment_ay > 400 and fte_ay > 200"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?", "output": "select t1.campus from campuses as t1 join enrollments as t2 on t1.id = t2.campus where t2.year = 1956 and totalenrollment_ay > 400 and fte_ay > 200"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Los Angeles.The county contains values such as Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many campuses are there in Los Angeles county?", "output": "select count(*) from campuses where county = \"Los Angeles\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many campuses exist are in the county of LA?", "output": "select count(*) from campuses where county = \"Los Angeles\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Los Angeles.The county contains values such as Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "List the campuses in Los Angeles county.", "output": "select campus from campuses where county = \"Los Angeles\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as Los Angeles.The county contains values such as Los Angeles. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What campuses are in Los Angeles county?", "output": "select campus from campuses where county = \"Los Angeles\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Jose State University.The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many degrees were conferred in \"San Jose State University\" in 2000?", "output": "select degrees from campuses as t1 join degrees as t2 on t1.id = t2.campus where t1.campus = \"San jose state University\" and t2.year = 2000"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Jose State University.The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many degrees were conferred at San Jose State University in 2000?", "output": "select degrees from campuses as t1 join degrees as t2 on t1.id = t2.campus where t1.campus = \"San jose state University\" and t2.year = 2000"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What are the degrees conferred in \"San Francisco State University\" in 2001.", "output": "select degrees from campuses as t1 join degrees as t2 on t1.id = t2.campus where t1.campus = \"San francisco state University\" and t2.year = 2001"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What degrees were conferred in San Francisco State University in the year 2001?", "output": "select degrees from campuses as t1 join degrees as t2 on t1.id = t2.campus where t1.campus = \"San francisco state University\" and t2.year = 2001"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty is there in total in the year of 2002?", "output": "select sum(faculty) from faculty where year = 2002"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty, in total, are there in the year 2002?", "output": "select sum(faculty) from faculty where year = 2002"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as Long Beach State University.The location contains values such as Long Beach. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the number of faculty lines in campus \"Long Beach State University\" in 2002?", "output": "select faculty from faculty as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2002 and t2.campus = \"Long beach state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as Long Beach State University.The location contains values such as Long Beach. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the number of faculty at Long Beach State University in 2002?", "output": "select faculty from faculty as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2002 and t2.campus = \"Long beach state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty lines are there in \"San Francisco State University\" in year 2004?", "output": "select faculty from faculty as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"San francisco state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty lines are there at San Francisco State University in 2004?", "output": "select faculty from faculty as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"San francisco state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "List the campus that have between 600 and 1000 faculty lines in year 2004.", "output": "select t1.campus from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.faculty >= 600 and t2.faculty <= 1000 and t1.year = 2004"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What are the campuses that had between 600 and 1000 faculty members in 2004?", "output": "select t1.campus from campuses as t1 join faculty as t2 on t1.id = t2.campus where t2.faculty >= 600 and t2.faculty <= 1000 and t1.year = 2004"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty lines are there in the university that conferred the most number of degrees in year 2002?", "output": "select t2.faculty from campuses as t1 join faculty as t2 on t1.id = t2.campus join degrees as t3 on t1.id = t3.campus and t2.year = t3.year where t2.year = 2002 order by t3.degrees desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty members did the university that conferred the most degrees in 2002 have?", "output": "select t2.faculty from campuses as t1 join faculty as t2 on t1.id = t2.campus join degrees as t3 on t1.id = t3.campus and t2.year = t3.year where t2.year = 2002 order by t3.degrees desc limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty lines are there in the university that conferred the least number of degrees in year 2001?", "output": "select t2.faculty from campuses as t1 join faculty as t2 on t1.id = t2.campus join degrees as t3 on t1.id = t3.campus and t2.year = t3.year where t2.year = 2001 order by t3.degrees limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many faculty members are at the university that gave the least number of degrees in 2001?", "output": "select t2.faculty from campuses as t1 join faculty as t2 on t1.id = t2.campus join degrees as t3 on t1.id = t3.campus and t2.year = t3.year where t2.year = 2001 order by t3.degrees limit 1"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Jose State University.The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many undergraduates are there in \"San Jose State University\" in year 2004?", "output": "select sum(t1.undergraduate) from discipline_enrollments as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"San jose state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many undergraduates are there at San Jose State", "output": "select sum(t1.undergraduate) from discipline_enrollments as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"San jose state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the number of graduates in \"San Francisco State University\" in year 2004?", "output": "select sum(t1.graduate) from discipline_enrollments as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"San francisco state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many people graduated from San Francisco State University in 2004?", "output": "select sum(t1.graduate) from discipline_enrollments as t1 join campuses as t2 on t1.campus = t2.id where t1.year = 2004 and t2.campus = \"San francisco state University\""}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the campus fee of \"San Francisco State University\" in year 2000?", "output": "select t1.campusfee from csu_fees as t1 join campuses as t2 on t1.campus = t2.id where t2.campus = \"San francisco state University\" and t1.year = 2000"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Francisco State University.The location contains values such as San Francisco.The county contains values such as San Francisco. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "In the year 2000, what is the campus fee for San Francisco State University?", "output": "select t1.campusfee from csu_fees as t1 join campuses as t2 on t1.campus = t2.id where t2.campus = \"San francisco state University\" and t1.year = 2000"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Jose State University.The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "Find the campus fee of \"San Jose State University\" in year 2000.", "output": "select t1.campusfee from csu_fees as t1 join campuses as t2 on t1.campus = t2.id where t2.campus = \"San jose state University\" and t1.year = 2000"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. The campus contains values such as San Jose State University.The location contains values such as San Jose. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the campus fee in the year 2000 for San Jose State University?", "output": "select t1.campusfee from csu_fees as t1 join campuses as t2 on t1.campus = t2.id where t2.campus = \"San jose state University\" and t1.year = 2000"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "How many CSU campuses are there?", "output": "select count(*) from campuses"}, {"instruction": "csu_1 contains tables such as campuses, csu_fees, degrees, discipline_enrollments, enrollments, faculty. Table campuses has columns such as id, campus, location, county, year. id is the primary key. Table csu_fees has columns such as campus, year, campusfee. campus is the primary key. Table degrees has columns such as year, campus, degrees. year is the primary key. Table discipline_enrollments has columns such as campus, discipline, year, undergraduate, graduate. campus is the primary key. Table enrollments has columns such as campus, year, totalenrollment_ay, fte_ay. campus is the primary key. Table faculty has columns such as campus, year, faculty. is the primary key. The campus of csu_fees is the foreign key of id of campuses. The campus of degrees is the foreign key of id of campuses. The campus of discipline_enrollments is the foreign key of id of campuses. The campus of enrollments is the foreign key of id of campuses. The campus of faculty is the foreign key of id of campuses.", "input": "What is the total number of campuses?", "output": "select count(*) from campuses"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "How many candidates are there?", "output": "select count(*) from candidate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Count the number of candidates.", "output": "select count(*) from candidate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Which poll resource provided the most number of candidate information?", "output": "select poll_source from candidate group by poll_source order by count(*) desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Return the poll resource associated with the most candidates.", "output": "select poll_source from candidate group by poll_source order by count(*) desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "what are the top 3 highest support rates?", "output": "select support_rate from candidate order by support_rate desc limit 3"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Return the top 3 greatest support rates.", "output": "select support_rate from candidate order by support_rate desc limit 3"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Find the id of the candidate who got the lowest oppose rate.", "output": "select candidate_id from candidate order by oppose_rate limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What is the id of the candidate with the lowest oppose rate?", "output": "select candidate_id from candidate order by oppose_rate limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.", "output": "select support_rate, consider_rate, oppose_rate from candidate order by unsure_rate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the support, consider, and oppose rates of each candidate, ordered ascending by their unsure rate?", "output": "select support_rate, consider_rate, oppose_rate from candidate order by unsure_rate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "which poll source does the highest oppose rate come from?", "output": "select poll_source from candidate order by oppose_rate desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Return the poll source corresponding to the candidate who has the oppose rate.", "output": "select poll_source from candidate order by oppose_rate desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "List all people names in the order of their date of birth from old to young.", "output": "select name from people order by date_of_birth"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the names of all people, ordered by their date of birth?", "output": "select name from people order by date_of_birth"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Find the average height and weight for all males (sex is M).", "output": "select avg(height), avg(weight) from people where sex = 'M'"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the average height and weight across males (sex is M)?", "output": "select avg(height), avg(weight) from people where sex = 'M'"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "find the names of people who are taller than 200 or lower than 190.", "output": "select name from people where height > 200 or height < 190"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the names of people who have a height greater than 200 or less than 190?", "output": "select name from people where height > 200 or height < 190"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Find the average and minimum weight for each gender.", "output": "select avg(weight), min(weight), sex from people group by sex"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the average and minimum weights for people of each sex?", "output": "select avg(weight), min(weight), sex from people group by sex"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Find the name and gender of the candidate who got the highest support rate.", "output": "select t1.name, t1.sex from people as t1 join candidate as t2 on t1.people_id = t2.people_id order by t2.support_rate desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What is the name and sex of the candidate with the highest support rate?", "output": "select t1.name, t1.sex from people as t1 join candidate as t2 on t1.people_id = t2.people_id order by t2.support_rate desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Find the name of the candidates whose oppose percentage is the lowest for each sex.", "output": "select t1.name, t1.sex, min(oppose_rate) from people as t1 join candidate as t2 on t1.people_id = t2.people_id group by t1.sex"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "For each sex, what is the name and sex of the candidate with the oppose rate for their sex?", "output": "select t1.name, t1.sex, min(oppose_rate) from people as t1 join candidate as t2 on t1.people_id = t2.people_id group by t1.sex"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "which gender got the highest average uncertain ratio.", "output": "select t1.sex from people as t1 join candidate as t2 on t1.people_id = t2.people_id group by t1.sex order by avg(t2.unsure_rate) desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What is the sex of the candidate who had the highest unsure rate?", "output": "select t1.sex from people as t1 join candidate as t2 on t1.people_id = t2.people_id group by t1.sex order by avg(t2.unsure_rate) desc limit 1"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "what are the names of people who did not participate in the candidate election.", "output": "select name from people where people_id not in (select people_id from candidate)"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Give the names of people who did not participate in the candidate election.", "output": "select name from people where people_id not in (select people_id from candidate)"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Find the names of the candidates whose support percentage is lower than their oppose rate.", "output": "select t1.name from people as t1 join candidate as t2 on t1.people_id = t2.people_id where t2.support_rate < t2.oppose_rate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the names of candidates who have a lower support rate than oppose rate?", "output": "select t1.name from people as t1 join candidate as t2 on t1.people_id = t2.people_id where t2.support_rate < t2.oppose_rate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "how many people are there whose weight is higher than 85 for each gender?", "output": "select count(*), sex from people where weight > 85 group by sex"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Count the number of people of each sex who have a weight higher than 85.", "output": "select count(*), sex from people where weight > 85 group by sex"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "find the highest support percentage, lowest consider rate and oppose rate of all candidates.", "output": "select max(support_rate), min(consider_rate), min(oppose_rate) from candidate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "Return the maximum support rate, minimum consider rate, and minimum oppose rate across all candidates?", "output": "select max(support_rate), min(consider_rate), min(oppose_rate) from candidate"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "list all female (sex is F) candidate names in the alphabetical order.", "output": "select t1.name from people as t1 join candidate as t2 on t1.people_id = t2.people_id where t1.sex = 'F' order by t1.name"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the names of all female candidates in alphabetical order (sex is F)?", "output": "select t1.name from people as t1 join candidate as t2 on t1.people_id = t2.people_id where t1.sex = 'F' order by t1.name"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "find the name of people whose height is lower than the average.", "output": "select name from people where height < (select avg(height) from people)"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What are the names of people who are shorter than average?", "output": "select name from people where height < (select avg(height) from people)"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "List all info about all people.", "output": "select * from people"}, {"instruction": "candidate_poll contains tables such as candidate, people. Table candidate has columns such as candidate_id, people_id, poll_source, date, support_rate, consider_rate, oppose_rate, unsure_rate. candidate_id is the primary key. Table people has columns such as people_id, sex, name, date_of_birth, height, weight. people_id is the primary key. The people_id of candidate is the foreign key of people_id of people.", "input": "What is all the information about all people?", "output": "select * from people"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as Steven Spielberg. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the titles of all movies directed by steven spielberg.", "output": "select title from movie where director = 'Steven Spielberg'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as Steven Spielberg. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all movies directed by Steven Spielberg?", "output": "select title from movie where director = 'Steven Spielberg'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as James Cameron. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as James Cameron. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the name of the movie produced after 2000 and directed by James Cameron?", "output": "select title from movie where director = 'James Cameron' and year > 2000"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as James Cameron. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as James Cameron. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles of all movies that James Cameron directed after 2000?", "output": "select title from movie where director = 'James Cameron' and year > 2000"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "How many movies were made before 2000?", "output": "select count(*) from movie where year < 2000"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "How many movies were made before 2000?", "output": "select count(*) from movie where year < 2000"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The title contains values such as Avatar. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Who is the director of movie Avatar?", "output": "select director from movie where title = 'Avatar'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The title contains values such as Avatar. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Who directed Avatar?", "output": "select director from movie where title = 'Avatar'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "How many reviewers listed?", "output": "select count(*) from reviewer"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "How many reviewers are there?", "output": "select count(*) from reviewer"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the id of the reviewer whose name has substring \u201cMike\u201d?", "output": "select rid from reviewer where name like \"%mike%\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the id of the reviewer whose name includes the word \"Mike\"?", "output": "select rid from reviewer where name like \"%mike%\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Daniel Lewis. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the reviewer id of Daniel Lewis?", "output": "select rid from reviewer where name = \"Daniel Lewis\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Daniel Lewis. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the id of the reviewer named Daniel Lewis?", "output": "select rid from reviewer where name = \"Daniel Lewis\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the total number of ratings that has more than 3 stars?", "output": "select count(*) from rating where stars > 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "How many movie ratings have more than 3 stars?", "output": "select count(*) from rating where stars > 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the lowest and highest rating star?", "output": "select max(stars), min(stars) from rating"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the maximum and mininum number of stars a rating can receive?", "output": "select max(stars), min(stars) from rating"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.", "output": "select distinct year from movie as t1 join rating as t2 on t1.mid = t2.mid where t2.stars >= 4 order by t1.year"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "In what years did a movie receive a 4 or 5 star rating, and list the years from oldest to most recently?", "output": "select distinct year from movie as t1 join rating as t2 on t1.mid = t2.mid where t2.stars >= 4 order by t1.year"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of directors who directed movies with 5 star rating? Also return the title of these movies.", "output": "select t1.director, t1.title from movie as t1 join rating as t2 on t1.mid = t2.mid where t2.stars = 5"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?", "output": "select t1.director, t1.title from movie as t1 join rating as t2 on t1.mid = t2.mid where t2.stars = 5"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the average rating star for each reviewer?", "output": "select t2.name, avg(t1.stars) from rating as t1 join reviewer as t2 on t1.rid = t2.rid group by t2.name"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the average number of stars that each reviewer awards for a movie?", "output": "select t2.name, avg(t1.stars) from rating as t1 join reviewer as t2 on t1.rid = t2.rid group by t2.name"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the titles of all movies that have no ratings.", "output": "select title from movie where mid not in (select mid from rating)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles of all movies that have not been rated?", "output": "select title from movie where mid not in (select mid from rating)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the names of all reviewers who have ratings with a NULL value for the date.", "output": "select distinct name from reviewer as t1 join rating as t2 on t1.rid = t2.rid where ratingdate = \"null\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the different names of all reviewers whose ratings do not have a date field?", "output": "select distinct name from reviewer as t1 join rating as t2 on t1.rid = t2.rid where ratingdate = \"null\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the average rating stars and title for the oldest movie?", "output": "select avg(t1.stars), t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t2.year = (select min(year) from movie)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For the oldest movie listed, what is its average rating and title?", "output": "select avg(t1.stars), t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t2.year = (select min(year) from movie)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the name of the most recent movie?", "output": "select title from movie where year = (select max(year) from movie)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the title of the newest movie?", "output": "select title from movie where year = (select max(year) from movie)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the maximum stars and year for the most recent movie?", "output": "select max(t1.stars), t2.year from rating as t1 join movie as t2 on t1.mid = t2.mid where t2.year = (select max(year) from movie)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is highest rating for the most recent movie and when was it released?", "output": "select max(t1.stars), t2.year from rating as t1 join movie as t2 on t1.mid = t2.mid where t2.year = (select max(year) from movie)"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as Steven Spielberg. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the names of movies whose created year is after all movies directed by Steven Spielberg?", "output": "select title from movie where year > (select max(year) from movie where director = \"Steven Spielberg\")"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as Steven Spielberg. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all movies that were created after the most recent Steven Spielberg film?", "output": "select title from movie where year > (select max(year) from movie where director = \"Steven Spielberg\")"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as James Cameron. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as James Cameron. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles and directors of the movies whose star is greater than the average stars of the movies directed by James Cameron?", "output": "select t2.title, t2.director from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars > (select avg(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid where t2.director = \"James Cameron\")"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as James Cameron. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as James Cameron. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles and directors of all movies that have a rating higher than the average James Cameron film rating?", "output": "select t2.title, t2.director from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars > (select avg(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid where t2.director = \"James Cameron\")"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.", "output": "select t3.name, t2.title, t1.stars, t1.ratingdate from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid order by t3.name, t2.title, t1.stars"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the reviewer name, film title, movie rating, and rating date for every movie ordered by reviewer name, movie title, then finally rating?", "output": "select t3.name, t2.title, t1.stars, t1.ratingdate from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid order by t3.name, t2.title, t1.stars"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the names of all reviewers who have contributed three or more ratings.", "output": "select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid group by t1.rid having count(*) >= 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all reviewers that have rated 3 or more movies?", "output": "select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid group by t1.rid having count(*) >= 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The title contains values such as Gone with the Wind. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the names of all reviewers who rated Gone with the Wind.", "output": "select distinct t3.name from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t2.title = 'Gone with the Wind'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The title contains values such as Gone with the Wind. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all the different reviewers who rates Gone with the Wind?", "output": "select distinct t3.name from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t2.title = 'Gone with the Wind'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Sarah Martinez. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the names of all directors whose movies are rated by Sarah Martinez.", "output": "select distinct t2.director from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t3.name = 'Sarah Martinez'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Sarah Martinez. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all directors whose movies have been reviewed by Sarah Martinez?", "output": "select distinct t2.director from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t3.name = 'Sarah Martinez'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For any rating where the name of reviewer is the same as the director of the movie, return the reviewer name, movie title, and number of stars.", "output": "select distinct t3.name, t2.title, t1.stars from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t2.director = t3.name"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the different reviewer names, movie titles, and stars for every rating where the reviewer had the same name as the director?", "output": "select distinct t3.name, t2.title, t1.stars from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t2.director = t3.name"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Return all reviewer names and movie names together in a single list.", "output": "select name from reviewer union select title from movie"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all the reviewers and movie names?", "output": "select name from reviewer union select title from movie"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Chris Jackson. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the titles of all movies not reviewed by Chris Jackson.", "output": "select distinct title from movie except select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t3.name = 'Chris Jackson'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Chris Jackson. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles of all movies that were not reviewed by Chris Jackson?", "output": "select distinct title from movie except select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t3.name = 'Chris Jackson'"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.", "output": "select t1.title, t1.director from movie as t1 join movie as t2 on t1.director = t2.director where t1.title != t2.title order by t1.director, t1.title"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For all directors who have directed more than one movie, what movies have they directed and what are their names?", "output": "select t1.title, t1.director from movie as t1 join movie as t2 on t1.director = t2.director where t1.title != t2.title order by t1.director, t1.title"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For directors who had more than one movie, return the titles and produced years of all movies directed by them.", "output": "select t1.title, t1.year from movie as t1 join movie as t2 on t1.director = t2.director where t1.title != t2.title"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For each director who directed more than one movie, what are the titles and dates of release for all those movies?", "output": "select t1.title, t1.year from movie as t1 join movie as t2 on t1.director = t2.director where t1.title != t2.title"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of the directors who made exactly one movie?", "output": "select director from movie group by director having count(*) = 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all directors who made one movie?", "output": "select director from movie group by director having count(*) = 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of the directors who made exactly one movie excluding director NULL?", "output": "select director from movie where director != \"null\" group by director having count(*) = 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all directors who have made one movie except for the director named NULL?", "output": "select director from movie where director != \"null\" group by director having count(*) = 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "How many movie reviews does each director get?", "output": "select count(*), t1.director from movie as t1 join rating as t2 on t1.mid = t2.mid group by t1.director"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For each director, how many reviews have they received?", "output": "select count(*), t1.director from movie as t1 join rating as t2 on t1.mid = t2.mid group by t1.director"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the movies with the highest average rating. Return the movie titles and average rating.", "output": "select t2.title, avg(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.mid order by avg(t1.stars) desc limit 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the movie titles with the highest average rating and what are those ratings?", "output": "select t2.title, avg(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.mid order by avg(t1.stars) desc limit 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the movie titles and average rating of the movies with the lowest average rating?", "output": "select t2.title, avg(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.mid order by avg(t1.stars) limit 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles and average ratings for all movies that have the lowest average rating?", "output": "select t2.title, avg(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.mid order by avg(t1.stars) limit 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names and years of the movies that has the top 3 highest rating star?", "output": "select t2.title, t2.year from rating as t1 join movie as t2 on t1.mid = t2.mid order by t1.stars desc limit 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names and years released for the movies with the top 3 highest ratings?", "output": "select t2.title, t2.year from rating as t1 join movie as t2 on t1.mid = t2.mid order by t1.stars desc limit 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL.", "output": "select t2.title, t1.stars, t2.director, max(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid where director != \"null\" group by director"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For each director, what are the titles and ratings for all the movies they reviewed?", "output": "select t2.title, t1.stars, t2.director, max(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid where director != \"null\" group by director"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the title and star rating of the movie that got the least rating star for each reviewer.", "output": "select t2.title, t1.rid, t1.stars, min(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.rid"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For each reviewer id, what is the title and rating for the movie with the smallest rating?", "output": "select t2.title, t1.rid, t1.stars, min(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.rid"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the title and score of the movie with the lowest rating among all movies directed by each director.", "output": "select t2.title, t1.stars, t2.director, min(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t2.director"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For each director, what is the title and score of their most poorly rated movie?", "output": "select t2.title, t1.stars, t2.director, min(t1.stars) from rating as t1 join movie as t2 on t1.mid = t2.mid group by t2.director"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the name of the movie that is rated by most of times?", "output": "select t2.title, t1.mid from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.mid order by count(*) desc limit 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the name of the movie that has been reviewed the most?", "output": "select t2.title, t1.mid from rating as t1 join movie as t2 on t1.mid = t2.mid group by t1.mid order by count(*) desc limit 1"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles of all movies that have rating star is between 3 and 5?", "output": "select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars between 3 and 5"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the titles of all movies that have between 3 and 5 stars?", "output": "select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars between 3 and 5"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the names of reviewers who had given higher than 3 star ratings.", "output": "select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t1.stars > 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of the reviewers who have rated a movie more than 3 stars before?", "output": "select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t1.stars > 3"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Brittany Harris. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the average rating star for each movie that are not reviewed by Brittany Harris.", "output": "select mid, avg(stars) from rating where mid not in (select t1.mid from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t2.name = \"Brittany Harris\") group by mid"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Brittany Harris. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What is the average rating for each movie that has never been reviewed by Brittany Harris?", "output": "select mid, avg(stars) from rating where mid not in (select t1.mid from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t2.name = \"Brittany Harris\") group by mid"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Brittany Harris. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the ids of the movies that are not reviewed by Brittany Harris.", "output": "select mid from rating except select t1.mid from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t2.name = \"Brittany Harris\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the ids of all moviest hat have not been reviewed by Britanny Harris?", "output": "select mid from rating except select t1.mid from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t2.name = \"Brittany Harris\""}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the average rating star for each movie that received at least 2 ratings.", "output": "select mid, avg(stars) from rating group by mid having count(*) >= 2"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "For each movie that received more than 3 reviews, what is the average rating?", "output": "select mid, avg(stars) from rating group by mid having count(*) >= 2"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "find the ids of reviewers who did not give 4 star.", "output": "select rid from rating except select rid from rating where stars = 4"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the ids of all reviewers who did not give 4 stars?", "output": "select rid from rating except select rid from rating where stars = 4"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "Find the ids of reviewers who didn't only give 4 star.", "output": "select rid from rating where stars != 4"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the ids of all reviewers who have not given 4 stars at least once?", "output": "select rid from rating where stars != 4"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Brittany Harris. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?", "output": "select distinct t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t3.name = 'Brittany Harris' or t2.year > 2000"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as Brittany Harris. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all movies that were made after 2000 or reviewed by Brittany Harris?", "output": "select distinct t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid join reviewer as t3 on t1.rid = t3.rid where t3.name = 'Brittany Harris' or t2.year > 2000"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as James Cameron. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as James Cameron. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are names of the movies that are either made before 1980 or directed by James Cameron?", "output": "select title from movie where director = \"James Cameron\" or year < 1980"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. The director contains values such as James Cameron. Table reviewer has columns such as rid, name. rid is the primary key. The name contains values such as James Cameron. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all movies made before 1980 or had James Cameron as the director?", "output": "select title from movie where director = \"James Cameron\" or year < 1980"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of reviewers who had rated 3 star and 4 star?", "output": "select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t1.stars = 3 intersect select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t1.stars = 4"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all reviewers that have given 3 or 4 stars for reviews?", "output": "select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t1.stars = 3 intersect select t2.name from rating as t1 join reviewer as t2 on t1.rid = t2.rid where t1.stars = 4"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of movies that get 3 star and 4 star?", "output": "select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars = 3 intersect select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars = 4"}, {"instruction": "movie_1 contains tables such as movie, reviewer, rating. Table movie has columns such as mid, title, year, director. mid is the primary key. Table reviewer has columns such as rid, name. rid is the primary key. Table rating has columns such as rid, mid, stars, ratingdate. is the primary key. The rid of rating is the foreign key of rid of reviewer. The mid of rating is the foreign key of mid of movie.", "input": "What are the names of all movies that received 3 or 4 stars?", "output": "select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars = 3 intersect select t2.title from rating as t1 join movie as t2 on t1.mid = t2.mid where t1.stars = 4"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "How many counties are there?", "output": "select count(*) from county_public_safety"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Count the number of countries.", "output": "select count(*) from county_public_safety"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "List the names of counties in descending order of population.", "output": "select name from county_public_safety order by population desc"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the names of the counties of public safety, ordered by population descending?", "output": "select name from county_public_safety order by population desc"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. The location contains values such as East. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "List the distinct police forces of counties whose location is not on east side.", "output": "select distinct police_force from county_public_safety where location != \"East\""}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. The location contains values such as East. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the different police forces of counties that are not located in the East?", "output": "select distinct police_force from county_public_safety where location != \"East\""}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the minimum and maximum crime rate of counties?", "output": "select min(crime_rate), max(crime_rate) from county_public_safety"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Return the minimum and maximum crime rates across all counties.", "output": "select min(crime_rate), max(crime_rate) from county_public_safety"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show the crime rates of counties in ascending order of number of police officers.", "output": "select crime_rate from county_public_safety order by police_officers asc"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the crime rates of counties sorted by number of offices ascending?", "output": "select crime_rate from county_public_safety order by police_officers asc"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the names of cities in ascending alphabetical order?", "output": "select name from city order by name asc"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Return the names of cities, ordered alphabetically.", "output": "select name from city order by name asc"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the percentage of hispanics in cities with the black percentage higher than 10?", "output": "select hispanic from city where black > 10"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Return the hispanic percentage for cities in which the black percentage is greater than 10.", "output": "select hispanic from city where black > 10"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "List the name of the county with the largest population.", "output": "select name from county_public_safety order by population desc limit 1"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What is the name of the county with the greatest population?", "output": "select name from county_public_safety order by population desc limit 1"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "List the names of the city with the top 5 white percentages.", "output": "select name from city order by white desc limit 5"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the names of the five cities with the greatest proportion of white people?", "output": "select name from city order by white desc limit 5"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show names of cities and names of counties they are in.", "output": "select t1.name, t2.name from city as t1 join county_public_safety as t2 on t1.county_id = t2.county_id"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the names of cities, as well as the names of the counties they correspond to?", "output": "select t1.name, t2.name from city as t1 join county_public_safety as t2 on t1.county_id = t2.county_id"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show white percentages of cities and the crime rates of counties they are in.", "output": "select t1.white, t2.crime_rate from city as t1 join county_public_safety as t2 on t1.county_id = t2.county_id"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?", "output": "select t1.white, t2.crime_rate from city as t1 join county_public_safety as t2 on t1.county_id = t2.county_id"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show the name of cities in the county that has the largest number of police officers.", "output": "select name from city where county_id = (select county_id from county_public_safety order by police_officers desc limit 1)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the names of cities that are in the county with the most police officers?", "output": "select name from city where county_id = (select county_id from county_public_safety order by police_officers desc limit 1)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show the number of cities in counties that have a population more than 20000.", "output": "select count(*) from city where county_id in (select county_id from county_public_safety where population > 20000)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "How many cities are in counties that have populations of over 20000?", "output": "select count(*) from city where county_id in (select county_id from county_public_safety where population > 20000)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show the crime rate of counties with a city having white percentage more than 90.", "output": "select t2.crime_rate from city as t1 join county_public_safety as t2 on t1.county_id = t2.county_id where t1.white > 90"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the crime rates of counties that contain cities that have white percentages of over 90?", "output": "select t2.crime_rate from city as t1 join county_public_safety as t2 on t1.county_id = t2.county_id where t1.white > 90"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Please show the police forces and the number of counties with each police force.", "output": "select police_force, count(*) from county_public_safety group by police_force"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "How many counties correspond to each police force?", "output": "select police_force, count(*) from county_public_safety group by police_force"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What is the location shared by most counties?", "output": "select location from county_public_safety group by location order by count(*) desc limit 1"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Which location has the most corresponding counties?", "output": "select location from county_public_safety group by location order by count(*) desc limit 1"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "List the names of counties that do not have any cities.", "output": "select name from county_public_safety where county_id not in (select county_id from city)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the names of counties that do not contain any cities?", "output": "select name from county_public_safety where county_id not in (select county_id from city)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. The location contains values such as East, West. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show the police force shared by counties with location on the east and west.", "output": "select police_force from county_public_safety where location = \"East\" intersect select police_force from county_public_safety where location = \"West\""}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. The location contains values such as East, West. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Which police forces operate in both counties that are located in the East and in the West?", "output": "select police_force from county_public_safety where location = \"East\" intersect select police_force from county_public_safety where location = \"West\""}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show the names of cities in counties that have a crime rate less than 100.", "output": "select name from city where county_id in (select county_id from county_public_safety where crime_rate < 100)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the names of cities that are in counties that have a crime rate below 100?", "output": "select name from city where county_id in (select county_id from county_public_safety where crime_rate < 100)"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "Show the case burden of counties in descending order of population.", "output": "select case_burden from county_public_safety order by population desc"}, {"instruction": "county_public_safety contains tables such as county_public_safety, city. Table county_public_safety has columns such as county_id, name, population, police_officers, residents_per_officer, case_burden, crime_rate, police_force, location. county_id is the primary key. Table city has columns such as city_id, county_id, name, white, black, amerindian, asian, multiracial, hispanic. city_id is the primary key. The county_id of city is the foreign key of county_id of county_public_safety.", "input": "What are the case burdens of counties, ordered descending by population?", "output": "select case_burden from county_public_safety order by population desc"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The decor contains values such as modern. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the names of all modern rooms with a base price below $160 and two beds.", "output": "select roomname from rooms where baseprice < 160 and beds = 2 and decor = 'modern';"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The decor contains values such as modern. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the names of modern rooms that have a base price lower than $160 and two beds.", "output": "select roomname from rooms where baseprice < 160 and beds = 2 and decor = 'modern';"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find all the rooms that have a price higher than 160 and can accommodate more than 2 people. Report room names and ids.", "output": "select roomname, roomid from rooms where baseprice > 160 and maxoccupancy > 2;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.", "output": "select roomname, roomid from rooms where baseprice > 160 and maxoccupancy > 2;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the most popular room in the hotel. The most popular room is the room that had seen the largest number of reservations.", "output": "select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room order by count(*) desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Which room has the largest number of reservations?", "output": "select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room order by count(*) desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The lastname contains values such as SWEAZY.The firstname contains values such as ROY. The room of reservations is the foreign key of roomid of rooms.", "input": "How many kids stay in the rooms reserved by ROY SWEAZY?", "output": "select kids from reservations where firstname = \"ROY\" and lastname = \"SWEAZY\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The firstname contains values such as ROY. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of kids staying in the rooms reserved by a person called ROY SWEAZ.", "output": "select kids from reservations where firstname = \"ROY\" and lastname = \"SWEAZY\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The lastname contains values such as SWEAZY.The firstname contains values such as ROY. The room of reservations is the foreign key of roomid of rooms.", "input": "How many times does ROY SWEAZY has reserved a room.", "output": "select count(*) from reservations where firstname = \"ROY\" and lastname = \"SWEAZY\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The lastname contains values such as SWEAZY.The firstname contains values such as ROY. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of times ROY SWEAZY has reserved a room.", "output": "select count(*) from reservations where firstname = \"ROY\" and lastname = \"SWEAZY\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Which room has the highest rate? List the room's full name, rate, check in and check out date.", "output": "select t2.roomname, t1.rate, t1.checkin, t1.checkout from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room order by t1.rate desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Return the name, rate, check in and check out date for the room with the highest rate.", "output": "select t2.roomname, t1.rate, t1.checkin, t1.checkout from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room order by t1.rate desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The lastname contains values such as CONRAD, SELBIG.The firstname contains values such as CONRAD. The room of reservations is the foreign key of roomid of rooms.", "input": "How many adults stay in the room CONRAD SELBIG checked in on Oct 23, 2010?", "output": "select adults from reservations where checkin = \"2010-10-23\" and firstname = \"CONRAD\" and lastname = \"SELBIG\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The lastname contains values such as CONRAD, SELBIG.The firstname contains values such as CONRAD. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.", "output": "select adults from reservations where checkin = \"2010-10-23\" and firstname = \"CONRAD\" and lastname = \"SELBIG\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The lastname contains values such as TRACHSEL.The firstname contains values such as DAMIEN. The room of reservations is the foreign key of roomid of rooms.", "input": "How many kids stay in the room DAMIEN TRACHSEL checked in on Sep 21, 2010?", "output": "select kids from reservations where checkin = \"2010-09-21\" and firstname = \"DAMIEN\" and lastname = \"TRACHSEL\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The lastname contains values such as TRACHSEL.The firstname contains values such as DAMIEN. The room of reservations is the foreign key of roomid of rooms.", "input": "Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21, 2010.", "output": "select kids from reservations where checkin = \"2010-09-21\" and firstname = \"DAMIEN\" and lastname = \"TRACHSEL\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many king beds are there?", "output": "select sum(beds) from rooms where bedtype = 'King';"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the total number of king beds available.", "output": "select sum(beds) from rooms where bedtype = 'King';"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "List the names and decor of rooms that have a king bed. Sort the list by their price.", "output": "select roomname, decor from rooms where bedtype = 'King' order by baseprice;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the names and decor of rooms with a king bed? Sort them by their price", "output": "select roomname, decor from rooms where bedtype = 'King' order by baseprice;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Which room has cheapest base price? List the room's name and the base price.", "output": "select roomname, baseprice from rooms order by baseprice asc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the room name and base price of the room with the lowest base price?", "output": "select roomname, baseprice from rooms order by baseprice asc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The roomname contains values such as Recluse and defiance. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the decor of room Recluse and defiance?", "output": "select decor from rooms where roomname = \"Recluse and defiance\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The roomname contains values such as Recluse and defiance. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Return the decor of the room named \"Recluse and defiance\".", "output": "select decor from rooms where roomname = \"Recluse and defiance\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the average base price of different bed type? List bed type and average base price.", "output": "select bedtype, avg(baseprice) from rooms group by bedtype;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "For each bed type, find the average base price of different bed type.", "output": "select bedtype, avg(baseprice) from rooms group by bedtype;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The decor contains values such as modern. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the total number of people who could stay in the modern rooms in this inn?", "output": "select sum(maxoccupancy) from rooms where decor = 'modern';"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The decor contains values such as modern. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many people in total can stay in the modern rooms of this inn?", "output": "select sum(maxoccupancy) from rooms where decor = 'modern';"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What kind of decor has the least number of reservations?", "output": "select t2.decor from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t2.decor order by count(t2.decor) asc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the least popular kind of decor?", "output": "select t2.decor from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t2.decor order by count(t2.decor) asc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.", "output": "select count(*) from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t2.maxoccupancy = t1.adults + t1.kids;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many times the number of adults and kids staying in a room reached the maximum capacity of the room?", "output": "select count(*) from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t2.maxoccupancy = t1.adults + t1.kids;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the first and last names of people who payed more than the rooms' base prices.", "output": "select t1.firstname, t1.lastname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t1.rate - t2.baseprice > 0"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the first and last names of people who payed more than the rooms' base prices?", "output": "select t1.firstname, t1.lastname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where t1.rate - t2.baseprice > 0"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many rooms are there?", "output": "select count(*) from rooms;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the total number of rooms available in this inn?", "output": "select count(*) from rooms;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of rooms with a king bed.", "output": "select count(*) from rooms where bedtype = \"King\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many rooms have a king bed?", "output": "select count(*) from rooms where bedtype = \"King\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of rooms for each bed type.", "output": "select bedtype, count(*) from rooms group by bedtype;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the number of rooms for each bed type?", "output": "select bedtype, count(*) from rooms group by bedtype;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the name of the room with the maximum occupancy.", "output": "select roomname from rooms order by maxoccupancy desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the name of the room that can accommodate the most people?", "output": "select roomname from rooms order by maxoccupancy desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the id and name of the most expensive base price room.", "output": "select roomid, roomname from rooms order by baseprice desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Which room has the highest base price?", "output": "select roomid, roomname from rooms order by baseprice desc limit 1;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The decor contains values such as traditional. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "List the type of bed and name of all traditional rooms.", "output": "select roomname, bedtype from rooms where decor = \"traditional\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The decor contains values such as traditional. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the bed type and name of all the rooms with traditional decor?", "output": "select roomname, bedtype from rooms where decor = \"traditional\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of rooms with king bed for each decor type.", "output": "select decor, count(*) from rooms where bedtype = \"King\" group by decor;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many rooms have king beds? Report the number for each decor type.", "output": "select decor, count(*) from rooms where bedtype = \"King\" group by decor;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the average and minimum price of the rooms in different decor.", "output": "select decor, avg(baseprice), min(baseprice) from rooms group by decor;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the average minimum and price of the rooms for each different decor.", "output": "select decor, avg(baseprice), min(baseprice) from rooms group by decor;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "List the name of all rooms sorted by their prices.", "output": "select roomname from rooms order by baseprice;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Sort all the rooms according to the price. Just report the room names.", "output": "select roomname from rooms order by baseprice;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of rooms with price higher than 120 for different decor.", "output": "select decor, count(*) from rooms where baseprice > 120 group by decor;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many rooms cost more than 120, for each different decor?", "output": "select decor, count(*) from rooms where baseprice > 120 group by decor;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "For each bed type, find the average room price.", "output": "select bedtype, avg(baseprice) from rooms group by bedtype;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What is the average base price of rooms, for each bed type?", "output": "select bedtype, avg(baseprice) from rooms group by bedtype;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as Queen, King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The firstname contains values such as QUEEN. The room of reservations is the foreign key of roomid of rooms.", "input": "List the name of rooms with king or queen bed.", "output": "select roomname from rooms where bedtype = \"King\" or bedtype = \"Queen\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. The bedtype contains values such as Queen, King. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The firstname contains values such as QUEEN. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the names of rooms that have either king or queen bed?", "output": "select roomname from rooms where bedtype = \"King\" or bedtype = \"Queen\";"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many different types of beds are there?", "output": "select count(distinct bedtype) from rooms;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of distinct bed types available in this inn.", "output": "select count(distinct bedtype) from rooms;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the name and id of the top 3 expensive rooms.", "output": "select roomid, roomname from rooms order by baseprice desc limit 3;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the name and id of the three highest priced rooms?", "output": "select roomid, roomname from rooms order by baseprice desc limit 3;"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the name of rooms whose price is higher than the average price.", "output": "select roomname from rooms where baseprice > ( select avg(baseprice) from rooms );"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the name of rooms that cost more than the average.", "output": "select roomname from rooms where baseprice > ( select avg(baseprice) from rooms );"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the number of rooms that do not have any reservation.", "output": "select count(*) from rooms where roomid not in (select distinct room from reservations)"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "How many rooms have not had any reservation yet?", "output": "select count(*) from rooms where roomid not in (select distinct room from reservations)"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Return the name and number of reservations made for each of the rooms.", "output": "select t2.roomname, count(*), t1.room from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "For each room, find its name and the number of times reservations were made for it.", "output": "select t2.roomname, count(*), t1.room from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the names of rooms that have been reserved for more than 60 times.", "output": "select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room having count(*) > 60"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the names of rooms whose reservation frequency exceeds 60 times?", "output": "select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid group by t1.room having count(*) > 60"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the name of rooms whose base price is between 120 and 150.", "output": "select roomname from rooms where baseprice between 120 and 150"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The room of reservations is the foreign key of roomid of rooms.", "input": "Which rooms cost between 120 and 150? Give me the room names.", "output": "select roomname from rooms where baseprice between 120 and 150"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The firstname contains values such as ROY. The room of reservations is the foreign key of roomid of rooms.", "input": "Find the name of rooms booked by some customers whose first name contains ROY.", "output": "select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where firstname like '%roy%'"}, {"instruction": "inn_1 contains tables such as rooms, reservations. Table rooms has columns such as roomid, roomname, beds, bedtype, maxoccupancy, baseprice, decor. roomid is the primary key. Table reservations has columns such as code, room, checkin, checkout, rate, lastname, firstname, adults, kids. code is the primary key. The firstname contains values such as ROY. The room of reservations is the foreign key of roomid of rooms.", "input": "What are the name of rooms booked by customers whose first name has \"ROY\" in part?", "output": "select t2.roomname from reservations as t1 join rooms as t2 on t1.room = t2.roomid where firstname like '%roy%'"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Tax. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "what are the details of the cmi masters that have the cross reference code 'Tax'?", "output": "select t1.cmi_details from customer_master_index as t1 join cmi_cross_references as t2 on t1.master_customer_id = t2.master_customer_id where t2.source_system_code = 'Tax'"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Tax. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code.", "output": "select t1.cmi_cross_ref_id, t1.source_system_code from cmi_cross_references as t1 join council_tax as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id group by t1.cmi_cross_ref_id having count(*) >= 1"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Business. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n", "output": "select t2.cmi_cross_ref_id, t2.master_customer_id, count(*) from business_rates as t1 join cmi_cross_references as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id group by t2.cmi_cross_ref_id"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Benefits, Tax. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.", "output": "select t1.source_system_code, t2.council_tax_id from cmi_cross_references as t1 join benefits_overpayments as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id order by t2.council_tax_id"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Parking, Tax. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "Wat is the tax source system code and master customer id of the taxes related to each parking fine id?", "output": "select t1.source_system_code, t1.master_customer_id, t2.council_tax_id from cmi_cross_references as t1 join parking_fines as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. The cmi_details contains values such as Schmidt, Kertzmann and Lubowitz. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Tax. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "What are the renting arrears tax ids related to the customer master index whose detail is not 'Schmidt, Kertzmann and Lubowitz'?", "output": "select t1.council_tax_id from rent_arrears as t1 join cmi_cross_references as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id join customer_master_index as t3 on t3.master_customer_id = t2.master_customer_id where t3.cmi_details != 'Schmidt, kertzmann and Lubowitz'"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Electoral, Tax. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?", "output": "select t1.electoral_register_id from electoral_register as t1 join cmi_cross_references as t2 on t1.cmi_cross_ref_id = t2.cmi_cross_ref_id where t2.source_system_code = 'Electoral' or t2.source_system_code = 'Tax'"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "How many different source system code for the cmi cross references are there?", "output": "select count(distinct source_system_code) from cmi_cross_references"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "List all information about customer master index, and sort them by details in descending order.", "output": "select * from customer_master_index order by cmi_details desc"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Parking, Tax. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "List the council tax ids and their related cmi cross references of all the parking fines.", "output": "select council_tax_id, cmi_cross_ref_id from parking_fines"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "How many council taxes are collected for renting arrears ?", "output": "select count(*) from rent_arrears"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. The cmi_details contains values such as Gottlieb, Becker and Wyman. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?", "output": "select distinct t2.source_system_code from customer_master_index as t1 join cmi_cross_references as t2 on t1.master_customer_id = t2.master_customer_id where t1.cmi_details = 'Gottlieb, becker and Wyman'"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. The source_system_code contains values such as Parking. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "Which cmi cross reference id is not related to any parking taxes?", "output": "select cmi_cross_ref_id from cmi_cross_references except select cmi_cross_ref_id from parking_fines"}, {"instruction": "local_govt_mdm contains tables such as customer_master_index, cmi_cross_references, council_tax, business_rates, benefits_overpayments, parking_fines, rent_arrears, electoral_register. Table customer_master_index has columns such as master_customer_id, cmi_details. master_customer_id is the primary key. Table cmi_cross_references has columns such as cmi_cross_ref_id, master_customer_id, source_system_code. cmi_cross_ref_id is the primary key. Table council_tax has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table business_rates has columns such as business_rates_id, cmi_cross_ref_id. business_rates_id is the primary key. Table benefits_overpayments has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table parking_fines has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table rent_arrears has columns such as council_tax_id, cmi_cross_ref_id. council_tax_id is the primary key. Table electoral_register has columns such as electoral_register_id, cmi_cross_ref_id. electoral_register_id is the primary key. The master_customer_id of cmi_cross_references is the foreign key of master_customer_id of customer_master_index. The cmi_cross_ref_id of council_tax is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of business_rates is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of benefits_overpayments is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of parking_fines is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of rent_arrears is the foreign key of cmi_cross_ref_id of cmi_cross_references. The cmi_cross_ref_id of electoral_register is the foreign key of cmi_cross_ref_id of cmi_cross_references.", "input": "Which distinct source system code includes the substring 'en'?", "output": "select distinct source_system_code from cmi_cross_references where source_system_code like '%en%'"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "How many parties are there?", "output": "select count(*) from party"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Count the number of parties.", "output": "select count(*) from party"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "List the themes of parties in ascending order of number of hosts.", "output": "select party_theme from party order by number_of_hosts asc"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "What are the themes of parties ordered by the number of hosts in ascending manner?", "output": "select party_theme from party order by number_of_hosts asc"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "What are the themes and locations of parties?", "output": "select party_theme, location from party"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Give me the theme and location of each party.", "output": "select party_theme, location from party"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. The party_theme contains values such as Teqnology, Spring. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the first year and last year of parties with theme \"Spring\" or \"Teqnology\".", "output": "select first_year, last_year from party where party_theme = \"Spring\" or party_theme = \"Teqnology\""}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. The party_theme contains values such as Teqnology, Spring. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "What are the first year and last year of the parties whose theme is \"Spring\" or \"Teqnology\"?", "output": "select first_year, last_year from party where party_theme = \"Spring\" or party_theme = \"Teqnology\""}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "What is the average number of hosts for parties?", "output": "select avg(number_of_hosts) from party"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Compute the average number of hosts for parties.", "output": "select avg(number_of_hosts) from party"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "What is the location of the party with the most hosts?", "output": "select location from party order by number_of_hosts desc limit 1"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Which party had the most hosts? Give me the party location.", "output": "select location from party order by number_of_hosts desc limit 1"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show different nationalities along with the number of hosts of each nationality.", "output": "select nationality, count(*) from host group by nationality"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "How many hosts does each nationality have? List the nationality and the count.", "output": "select nationality, count(*) from host group by nationality"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the most common nationality of hosts.", "output": "select nationality from host group by nationality order by count(*) desc limit 1"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Which nationality has the most hosts?", "output": "select nationality from host group by nationality order by count(*) desc limit 1"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the nations that have both hosts older than 45 and hosts younger than 35.", "output": "select nationality from host where age > 45 intersect select nationality from host where age < 35"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Which nations have both hosts of age above 45 and hosts of age below 35?", "output": "select nationality from host where age > 45 intersect select nationality from host where age < 35"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the themes of parties and the names of the party hosts.", "output": "select t3.party_theme, t2.name from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "For each party, return its theme and the name of its host.", "output": "select t3.party_theme, t2.name from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the locations of parties and the names of the party hosts in ascending order of the age of the host.", "output": "select t3.location, t2.name from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id order by t2.age"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.", "output": "select t3.location, t2.name from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id order by t2.age"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the locations of parties with hosts older than 50.", "output": "select t3.location from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id where t2.age > 50"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Which parties have hosts of age above 50? Give me the party locations.", "output": "select t3.location from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id where t2.age > 50"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the host names for parties with number of hosts greater than 20.", "output": "select t2.name from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id where t3.number_of_hosts > 20"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Which parties have more than 20 hosts? Give me the host names for these parties.", "output": "select t2.name from party_host as t1 join host as t2 on t1.host_id = t2.host_id join party as t3 on t1.party_id = t3.party_id where t3.number_of_hosts > 20"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "Show the name and the nationality of the oldest host.", "output": "select name, nationality from host order by age desc limit 1"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "What are the name and the nationality of the host of the highest age?", "output": "select name, nationality from host order by age desc limit 1"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "List the names of hosts who did not serve as a host of any party in our record.", "output": "select name from host where host_id not in (select host_id from party_host)"}, {"instruction": "party_host contains tables such as party, host, party_host. Table party has columns such as party_id, party_theme, location, first_year, last_year, number_of_hosts. party_id is the primary key. Table host has columns such as host_id, name, nationality, age. host_id is the primary key. Table party_host has columns such as party_id, host_id, is_main_in_charge. party_id is the primary key. The party_id of party_host is the foreign key of party_id of party. The host_id of party_host is the foreign key of host_id of host.", "input": "What are the names of hosts who did not host any party in our record?", "output": "select name from host where host_id not in (select host_id from party_host)"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "How many regions do we have?", "output": "select count(*) from region"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Count the number of regions.", "output": "select count(*) from region"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show all region code and region name sorted by the codes.", "output": "select region_code, region_name from region order by region_code"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the codes and names for all regions, sorted by codes?", "output": "select region_code, region_name from region order by region_code"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "List all region names in alphabetical order.", "output": "select region_name from region order by region_name"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of the regions in alphabetical order?", "output": "select region_name from region order by region_name"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. The region_name contains values such as Denmark. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show names for all regions except for Denmark.", "output": "select region_name from region where region_name != 'Denmark'"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. The region_name contains values such as Denmark. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Return the names of all regions other than Denmark.", "output": "select region_name from region where region_name != 'Denmark'"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "How many storms had death records?", "output": "select count(*) from storm where number_deaths > 0"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Count the number of storms in which at least 1 person died.", "output": "select count(*) from storm where number_deaths > 0"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "List name, dates active, and number of deaths for all storms with at least 1 death.", "output": "select name, dates_active, number_deaths from storm where number_deaths >= 1"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names, dates active, and number of deaths for storms that had 1 or more death?", "output": "select name, dates_active, number_deaths from storm where number_deaths >= 1"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show the average and maximum damage for all storms with max speed higher than 1000.", "output": "select avg(damage_millions_usd), max(damage_millions_usd) from storm where max_speed > 1000"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What is the average and maximum damage in millions for storms that had a max speed over 1000?", "output": "select avg(damage_millions_usd), max(damage_millions_usd) from storm where max_speed > 1000"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What is the total number of deaths and damage for all storms with a max speed greater than the average?", "output": "select sum(number_deaths), sum(damage_millions_usd) from storm where max_speed > (select avg(max_speed) from storm)"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Return the total number of deaths and total damange in millions for storms that had a max speed greater than the average.", "output": "select sum(number_deaths), sum(damage_millions_usd) from storm where max_speed > (select avg(max_speed) from storm)"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "List name and damage for all storms in a descending order of max speed.", "output": "select name, damage_millions_usd from storm order by max_speed desc"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names and damage in millions for storms, ordered by their max speeds descending?", "output": "select name, damage_millions_usd from storm order by max_speed desc"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "How many regions are affected?", "output": "select count(distinct region_id) from affected_region"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Count the number of different affected regions.", "output": "select count(distinct region_id) from affected_region"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show the name for regions not affected.", "output": "select region_name from region where region_id not in (select region_id from affected_region)"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of regions that were not affected?", "output": "select region_name from region where region_id not in (select region_id from affected_region)"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show the name for regions and the number of storms for each region.", "output": "select t1.region_name, count(*) from region as t1 join affected_region as t2 on t1.region_id = t2.region_id group by t1.region_id"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "How many storms occured in each region?", "output": "select t1.region_name, count(*) from region as t1 join affected_region as t2 on t1.region_id = t2.region_id group by t1.region_id"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "List the name for storms and the number of affected regions for each storm.", "output": "select t1.name, count(*) from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "How many regions were affected by each storm?", "output": "select t1.name, count(*) from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What is the storm name and max speed which affected the greatest number of regions?", "output": "select t1.name, t1.max_speed from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id order by count(*) desc limit 1"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Return the name and max speed of the storm that affected the most regions.", "output": "select t1.name, t1.max_speed from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id order by count(*) desc limit 1"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show the name of storms which don't have affected region in record.", "output": "select name from storm where storm_id not in (select storm_id from affected_region)"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of storms that did not affect any regions?", "output": "select name from storm where storm_id not in (select storm_id from affected_region)"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. The name contains values such as Two. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show storm name with at least two regions and 10 cities affected.", "output": "select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having count(*) >= 2 intersect select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having sum(t2.number_city_affected) >= 10"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. The name contains values such as Two. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of storms that both affected two or more regions and affected a total of 10 or more cities?", "output": "select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having count(*) >= 2 intersect select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having sum(t2.number_city_affected) >= 10"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. The name contains values such as Two. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show all storm names except for those with at least two affected regions.", "output": "select name from storm except select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having count(*) >= 2"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. The name contains values such as Two. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of storms that did not affect two or more regions?", "output": "select name from storm except select t1.name from storm as t1 join affected_region as t2 on t1.storm_id = t2.storm_id group by t1.storm_id having count(*) >= 2"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the region names affected by the storm with a number of deaths of least 10?", "output": "select t2.region_name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t3.number_deaths >= 10"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Return the names of the regions affected by storms that had a death count of at least 10.", "output": "select t2.region_name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t3.number_deaths >= 10"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. The region_name contains values such as Denmark. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show all storm names affecting region \"Denmark\".", "output": "select t3.name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t2.region_name = 'Denmark'"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. The region_name contains values such as Denmark. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of the storms that affected Denmark?", "output": "select t3.name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t2.region_name = 'Denmark'"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. The name contains values such as Two. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Show the region name with at least two storms.", "output": "select t1.region_name from region as t1 join affected_region as t2 on t1.region_id = t2.region_id group by t1.region_id having count(*) >= 2"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. The name contains values such as Two. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of regions with two or more storms?", "output": "select t1.region_name from region as t1 join affected_region as t2 on t1.region_id = t2.region_id group by t1.region_id having count(*) >= 2"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Find the names of the regions which were affected by the storm that killed the greatest number of people.", "output": "select t2.region_name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id order by t3.number_deaths desc limit 1"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of regions that were affected by the storm in which the most people died?", "output": "select t2.region_name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id order by t3.number_deaths desc limit 1"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. The region_name contains values such as Afghanistan, Albania. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "Find the name of the storm that affected both Afghanistan and Albania regions.", "output": "select t3.name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t2.region_name = 'Afghanistan' intersect select t3.name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t2.region_name = 'Albania'"}, {"instruction": "storm_record contains tables such as storm, region, affected_region. Table storm has columns such as storm_id, name, dates_active, max_speed, damage_millions_usd, number_deaths. storm_id is the primary key. Table region has columns such as region_id, region_code, region_name. region_id is the primary key. The region_name contains values such as Afghanistan, Albania. Table affected_region has columns such as region_id, storm_id, number_city_affected. region_id is the primary key. The storm_id of affected_region is the foreign key of storm_id of storm. The region_id of affected_region is the foreign key of region_id of region.", "input": "What are the names of the storms that affected both the regions of Afghanistan and Albania?", "output": "select t3.name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t2.region_name = 'Afghanistan' intersect select t3.name from affected_region as t1 join region as t2 on t1.region_id = t2.region_id join storm as t3 on t1.storm_id = t3.storm_id where t2.region_name = 'Albania'"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "How many counties are there in total?", "output": "select count(*) from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Count the total number of counties.", "output": "select count(*) from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the county name and population of all counties.", "output": "select county_name, population from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the name and population of each county?", "output": "select county_name, population from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the average population of all counties.", "output": "select avg(population) from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "On average how large is the population of the counties?", "output": "select avg(population) from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Return the maximum and minimum population among all counties.", "output": "select max(population), min(population) from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the maximum and minimum population of the counties?", "output": "select max(population), min(population) from county"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show all the distinct districts for elections.", "output": "select distinct district from election"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the distinct districts for elections?", "output": "select distinct district from election"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. The county_name contains values such as Howard. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the zip code of the county with name \"Howard\".", "output": "select zip_code from county where county_name = \"Howard\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. The county_name contains values such as Howard. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What is the zip code the county named \"Howard\" is located in?", "output": "select zip_code from county where county_name = \"Howard\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the delegate from district 1 in election.", "output": "select delegate from election where district = 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Who is the delegate of district 1 in the elections?", "output": "select delegate from election where district = 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the delegate and committee information of elections.", "output": "select delegate, committee from election"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the delegate and committee information for each election record?", "output": "select delegate, committee from election"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "How many distinct governors are there?", "output": "select count(distinct governor) from party"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Count the number of distinct governors.", "output": "select count(distinct governor) from party"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The party contains values such as Democratic. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the lieutenant governor and comptroller from the democratic party.", "output": "select lieutenant_governor, comptroller from party where party = \"Democratic\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The party contains values such as Democratic. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Who are the lieutenant governor and comptroller from the democratic party?", "output": "select lieutenant_governor, comptroller from party where party = \"Democratic\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The governor contains values such as Eliot Spitzer.The attorney_general contains values such as Eliot Spitzer. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "In which distinct years was the governor \"Eliot Spitzer\"?", "output": "select distinct year from party where governor = \"Eliot Spitzer\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The governor contains values such as Eliot Spitzer.The attorney_general contains values such as Eliot Spitzer. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Find the distinct years when the governor was named \"Eliot Spitzer\".", "output": "select distinct year from party where governor = \"Eliot Spitzer\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show all the information about election.", "output": "select * from election"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Return all the information for each election record.", "output": "select * from election"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the delegates and the names of county they belong to.", "output": "select t2.delegate, t1.county_name from county as t1 join election as t2 on t1.county_id = t2.district"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the delegate and name of the county they belong to, for each county?", "output": "select t2.delegate, t1.county_name from county as t1 join election as t2 on t1.county_id = t2.district"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which delegates are from counties with population smaller than 100000?", "output": "select t2.delegate from county as t1 join election as t2 on t1.county_id = t2.district where t1.population < 100000"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Find the delegates who are from counties with population below 100000.", "output": "select t2.delegate from county as t1 join election as t2 on t1.county_id = t2.district where t1.population < 100000"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "How many distinct delegates are from counties with population larger than 50000?", "output": "select count(distinct t2.delegate) from county as t1 join election as t2 on t1.county_id = t2.district where t1.population > 50000"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Count the number of distinct delegates who are from counties with population above 50000.", "output": "select count(distinct t2.delegate) from county as t1 join election as t2 on t1.county_id = t2.district where t1.population > 50000"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The committee contains values such as Appropriations. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the names of the county that the delegates on \"Appropriations\" committee belong to?", "output": "select t1.county_name from county as t1 join election as t2 on t1.county_id = t2.district where t2.committee = \"Appropriations\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The committee contains values such as Appropriations. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which county do the delegates on \"Appropriations\" committee belong to? Give me the county names.", "output": "select t1.county_name from county as t1 join election as t2 on t1.county_id = t2.district where t2.committee = \"Appropriations\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the delegates and the names of the party they belong to.", "output": "select t1.delegate, t2.party from election as t1 join party as t2 on t1.party = t2.party_id"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "For each delegate, find the names of the party they are part of.", "output": "select t1.delegate, t2.party from election as t1 join party as t2 on t1.party = t2.party_id"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Who were the governors of the parties associated with delegates from district 1?", "output": "select t2.governor from election as t1 join party as t2 on t1.party = t2.party_id where t1.district = 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Find the parties associated with the delegates from district 1. Who served as governors of the parties?", "output": "select t2.governor from election as t1 join party as t2 on t1.party = t2.party_id where t1.district = 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?", "output": "select t2.comptroller from election as t1 join party as t2 on t1.party = t2.party_id where t1.district = 1 or t1.district = 2"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?", "output": "select t2.comptroller from election as t1 join party as t2 on t1.party = t2.party_id where t1.district = 1 or t1.district = 2"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The party contains values such as Democratic. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Return all the committees that have delegates from Democratic party.", "output": "select t1.committee from election as t1 join party as t2 on t1.party = t2.party_id where t2.party = \"Democratic\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The party contains values such as Democratic. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which committees have delegates from the Democratic party?", "output": "select t1.committee from election as t1 join party as t2 on t1.party = t2.party_id where t2.party = \"Democratic\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the name of each county along with the corresponding number of delegates from that county.", "output": "select t1.county_name, count(*) from county as t1 join election as t2 on t1.county_id = t2.district group by t1.county_id"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "For each county, find the name of the county and the number of delegates from that county.", "output": "select t1.county_name, count(*) from county as t1 join election as t2 on t1.county_id = t2.district group by t1.county_id"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the name of each party and the corresponding number of delegates from that party.", "output": "select t2.party, count(*) from election as t1 join party as t2 on t1.party = t2.party_id group by t1.party"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "For each party, return the name of the party and the number of delegates from that party.", "output": "select t2.party, count(*) from election as t1 join party as t2 on t1.party = t2.party_id group by t1.party"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Return the names of all counties sorted by population in ascending order.", "output": "select county_name from county order by population asc"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Sort the names of all counties in ascending order of population.", "output": "select county_name from county order by population asc"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Return the names of all counties sorted by county name in descending alphabetical order.", "output": "select county_name from county order by county_name desc"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Sort the names of all counties in descending alphabetical order.", "output": "select county_name from county order by county_name desc"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the name of the county with the biggest population.", "output": "select county_name from county order by population desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which county has the largest population? Give me the name of the county.", "output": "select county_name from county order by population desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the 3 counties with the smallest population.", "output": "select county_name from county order by population asc limit 3"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the 3 counties that have the smallest population? Give me the county names.", "output": "select county_name from county order by population asc limit 3"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the names of counties that have at least two delegates.", "output": "select t1.county_name from county as t1 join election as t2 on t1.county_id = t2.district group by t1.county_id having count(*) >= 2"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which counties have two or more delegates? Give me the county names.", "output": "select t1.county_name from county as t1 join election as t2 on t1.county_id = t2.district group by t1.county_id having count(*) >= 2"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the name of the party that has at least two records.", "output": "select party from party group by party having count(*) >= 2"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which party has two or more records?", "output": "select party from party group by party having count(*) >= 2"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the name of the party that has the most delegates.", "output": "select t2.party from election as t1 join party as t2 on t1.party = t2.party_id group by t1.party order by count(*) desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which party has the largest number of delegates?", "output": "select t2.party from election as t1 join party as t2 on t1.party = t2.party_id group by t1.party order by count(*) desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the people that have been governor the most times.", "output": "select governor from party group by governor order by count(*) desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which people severed as governor most frequently?", "output": "select governor from party group by governor order by count(*) desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Show the people that have been comptroller the most times and the corresponding number of times.", "output": "select comptroller, count(*) from party group by comptroller order by count(*) desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which people severed as comptroller most frequently? Give me the name of the person and the frequency count.", "output": "select comptroller, count(*) from party group by comptroller order by count(*) desc limit 1"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the names of parties that do not have delegates in election?", "output": "select party from party where party_id not in (select party from election)"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which parties did not have any delegates in elections?", "output": "select party from party where party_id not in (select party from election)"}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The committee contains values such as Appropriations. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "What are the names of parties that have both delegates on \"Appropriations\" committee and", "output": "select t2.party from election as t1 join party as t2 on t1.party = t2.party_id where t1.committee = \"Appropriations\" intersect select t2.party from election as t1 join party as t2 on t1.party = t2.party_id where t1.committee = \"Economic Matters\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The committee contains values such as Economic Matters, Appropriations. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which parties have delegates in both the \"Appropriations\" committee and the \"Economic Matters\" committee?", "output": "select t2.party from election as t1 join party as t2 on t1.party = t2.party_id where t1.committee = \"Appropriations\" intersect select t2.party from election as t1 join party as t2 on t1.party = t2.party_id where t1.committee = \"Economic Matters\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The party contains values such as Democratic, Liberal. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Which committees have delegates from both democratic party and liberal party?", "output": "select t1.committee from election as t1 join party as t2 on t1.party = t2.party_id where t2.party = \"Democratic\" intersect select t1.committee from election as t1 join party as t2 on t1.party = t2.party_id where t2.party = \"Liberal\""}, {"instruction": "election contains tables such as county, party, election. Table county has columns such as county_id, county_name, population, zip_code. county_id is the primary key. Table party has columns such as party_id, year, party, governor, lieutenant_governor, comptroller, attorney_general, us_senate. party_id is the primary key. The party contains values such as Democratic, Liberal. Table election has columns such as election_id, counties_represented, district, delegate, party, first_elected, committee. election_id is the primary key. The district of election is the foreign key of county_id of county. The party of election is the foreign key of party_id of party.", "input": "Find the committees that have delegates both from from the democratic party and the liberal party.", "output": "select t1.committee from election as t1 join party as t2 on t1.party = t2.party_id where t2.party = \"Democratic\" intersect select t1.committee from election as t1 join party as t2 on t1.party = t2.party_id where t2.party = \"Liberal\""}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "How many journalists are there?", "output": "select count(*) from journalist"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "List the names of journalists in ascending order of years working.", "output": "select name from journalist order by years_working asc"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "What are the nationalities and ages of journalists?", "output": "select nationality, age from journalist"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. The nationality contains values such as England, Wales. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the names of journalists from \"England\" or \"Wales\".", "output": "select name from journalist where nationality = \"England\" or nationality = \"Wales\""}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "What is the average number of years spent working as a journalist?", "output": "select avg(years_working) from journalist"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "What is the nationality of the journalist with the largest number of years working?", "output": "select nationality from journalist order by years_working desc limit 1"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the different nationalities and the number of journalists of each nationality.", "output": "select nationality, count(*) from journalist group by nationality"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the most common nationality for journalists.", "output": "select nationality from journalist group by nationality order by count(*) desc limit 1"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.", "output": "select nationality from journalist where years_working > 10 intersect select nationality from journalist where years_working < 3"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the dates, places, and names of events in descending order of the attendance.", "output": "select date, name, venue from event order by event_attendance desc"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the names of journalists and the dates of the events they reported.", "output": "select t3.name, t2.date from news_report as t1 join event as t2 on t1.event_id = t2.event_id join journalist as t3 on t1.journalist_id = t3.journalist_id"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the names of journalists and the names of the events they reported in ascending order", "output": "select t3.name, t2.name from news_report as t1 join event as t2 on t1.event_id = t2.event_id join journalist as t3 on t1.journalist_id = t3.journalist_id order by t2.event_attendance asc"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the names of journalists and the number of events they reported.", "output": "select t3.name, count(*) from news_report as t1 join event as t2 on t1.event_id = t2.event_id join journalist as t3 on t1.journalist_id = t3.journalist_id group by t3.name"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Show the names of journalists that have reported more than one event.", "output": "select t3.name from news_report as t1 join event as t2 on t1.event_id = t2.event_id join journalist as t3 on t1.journalist_id = t3.journalist_id group by t3.name having count(*) > 1"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "List the names of journalists who have not reported any event.", "output": "select name from journalist where journalist_id not in (select journalist_id from news_report)"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "what are the average and maximum attendances of all events?", "output": "select avg(event_attendance), max(event_attendance) from event"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "Find the average age and experience working length of journalists working on different role type.", "output": "select avg(t1.age), avg(years_working), t2.work_type from journalist as t1 join news_report as t2 on t1.journalist_id = t2.journalist_id group by t2.work_type"}, {"instruction": "news_report contains tables such as event, journalist, news_report. Table event has columns such as event_id, date, venue, name, event_attendance. event_id is the primary key. Table journalist has columns such as journalist_id, name, nationality, age, years_working. journalist_id is the primary key. Table news_report has columns such as journalist_id, event_id, work_type. journalist_id is the primary key. The event_id of news_report is the foreign key of event_id of event. The journalist_id of news_report is the foreign key of journalist_id of journalist.", "input": "List the event venues and names that have the top 2 most number of people attended.", "output": "select venue, name from event order by event_attendance desc limit 2"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Show me all the restaurants.", "output": "select resname from restaurant;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. The resname contains values such as Subway. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "What is the address of the restaurant Subway?", "output": "select address from restaurant where resname = \"Subway\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. The resname contains values such as Subway. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "What is the rating of the restaurant Subway?", "output": "select rating from restaurant where resname = \"Subway\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "List all restaurant types.", "output": "select restypename from restaurant_type;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. The restypename contains values such as Sandwich. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "What is the description of the restaurant type Sandwich?", "output": "select restypedescription from restaurant_type where restypename = \"Sandwich\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Which restaurants have highest rating? List the restaurant name and its rating.", "output": "select resname, rating from restaurant order by rating desc limit 1;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "What is the age of student Linda Smith?", "output": "select age from student where fname = \"Linda\" and lname = \"Smith\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "What is the gender of the student Linda Smith?", "output": "select sex from student where fname = \"Linda\" and lname = \"Smith\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "List all students' first names and last names who majored in 600.", "output": "select fname, lname from student where major = 600;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Which city does student Linda Smith live in?", "output": "select city_code from student where fname = \"Linda\" and lname = \"Smith\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Advisor 1121 has how many students?", "output": "select count(*) from student where advisor = 1121;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Which Advisor has most of students? List advisor and the number of students.", "output": "select advisor, count(*) from student group by advisor order by count(advisor) desc limit 1;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Which major has least number of students? List the major and the number of students.", "output": "select major, count(*) from student group by major order by count(major) asc limit 1;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Which major has between 2 and 30 number of students? List major and the number of students.", "output": "select major, count(*) from student group by major having count(major) between 2 and 30;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Which student's age is older than 18 and is majoring in 600? List each student's first and last name.", "output": "select fname, lname from student where age > 18 and major = 600;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "List all female students age is older than 18 who is not majoring in 600. List students' first name and last name.", "output": "select fname, lname from student where age > 18 and major != 600 and sex = 'F';"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. The restypename contains values such as Sandwich. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "How many restaurant is the Sandwich type restaurant?", "output": "select count(*) from restaurant join type_of_restaurant on restaurant.resid = type_of_restaurant.resid join restaurant_type on type_of_restaurant.restypeid = restaurant_type.restypeid group by type_of_restaurant.restypeid having restaurant_type.restypename = 'Sandwich'"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "How long does student Linda Smith spend on the restaurant in total?", "output": "select sum(spent) from student join visits_restaurant on student.stuid = visits_restaurant.stuid where student.fname = \"Linda\" and student.lname = \"Smith\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. The resname contains values such as Subway. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "How many times has the student Linda Smith visited Subway?", "output": "select count(*) from student join visits_restaurant on student.stuid = visits_restaurant.stuid join restaurant on visits_restaurant.resid = restaurant.resid where student.fname = \"Linda\" and student.lname = \"Smith\" and restaurant.resname = \"Subway\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. The resname contains values such as Subway. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "When did Linda Smith visit Subway?", "output": "select time from student join visits_restaurant on student.stuid = visits_restaurant.stuid join restaurant on visits_restaurant.resid = restaurant.resid where student.fname = \"Linda\" and student.lname = \"Smith\" and restaurant.resname = \"Subway\";"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.", "output": "select restaurant.resname, sum(visits_restaurant.spent) from visits_restaurant join restaurant on visits_restaurant.resid = restaurant.resid group by restaurant.resid order by sum(visits_restaurant.spent) asc limit 1;"}, {"instruction": "restaurant_1 contains tables such as student, restaurant, type_of_restaurant, restaurant_type, visits_restaurant. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table restaurant has columns such as resid, resname, address, rating. resid is the primary key. Table type_of_restaurant has columns such as resid, restypeid. is the primary key. Table restaurant_type has columns such as restypeid, restypename, restypedescription. restypeid is the primary key. Table visits_restaurant has columns such as stuid, resid, time, spent. is the primary key. The restypeid of type_of_restaurant is the foreign key of restypeid of restaurant_type. The resid of type_of_restaurant is the foreign key of resid of restaurant. The resid of visits_restaurant is the foreign key of resid of restaurant. The stuid of visits_restaurant is the foreign key of stuid of student.", "input": "Which student visited restaurant most often? List student's first name and last name.", "output": "select student.fname, student.lname from student join visits_restaurant on student.stuid = visits_restaurant.stuid group by student.stuid order by count(*) desc limit 1;"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. The order_status_code contains values such as Success. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the ids of orders whose status is 'Success'.", "output": "select actual_order_id from actual_orders where order_status_code = 'Success'"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the name and price of the product that has been ordered the greatest number of times.", "output": "select t1.product_name, t1.product_price from products as t1 join regular_order_products as t2 on t1.product_id = t2.product_id group by t2.product_id order by count(*) desc limit 1"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the number of customers in total.", "output": "select count(*) from customers"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "How many different payment methods are there?", "output": "select count(distinct payment_method) from customers"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Show the details of all trucks in the order of their license number.", "output": "select truck_details from trucks order by truck_licence_number"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the name of the most expensive product.", "output": "select product_name from products order by product_price desc limit 1"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. The state_province_county contains values such as California. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the names of customers who are not living in the state of California.", "output": "select customer_name from customers except select t1.customer_name from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t3.state_province_county = 'California'"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. The payment_method contains values such as Visa. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "List the names and emails of customers who payed by Visa card.", "output": "select customer_email, customer_name from customers where payment_method = 'Visa'"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. The state_province_county contains values such as California. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the names and phone numbers of customers living in California state.", "output": "select t1.customer_name, t1.customer_phone from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t3.state_province_county = 'California'"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the states which do not have any employee in their record.", "output": "select state_province_county from addresses where address_id not in (select employee_address_id from employees)"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "List the names, phone numbers, and emails of all customers sorted by their dates of becoming customers.", "output": "select customer_name, customer_phone, customer_email from customers order by date_became_customer"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the name of the first 5 customers.", "output": "select customer_name from customers order by date_became_customer limit 5"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the payment method that is used most frequently.", "output": "select payment_method from customers group by payment_method order by count(*) desc limit 1"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "List the names of all routes in alphabetic order.", "output": "select route_name from delivery_routes order by route_name"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "Find the name of route that has the highest number of deliveries.", "output": "select t1.route_name from delivery_routes as t1 join delivery_route_locations as t2 on t1.route_id = t2.route_id group by t1.route_id order by count(*) desc limit 1"}, {"instruction": "customer_deliveries contains tables such as products, addresses, customers, regular_orders, regular_order_products, actual_orders, actual_order_products, customer_addresses, delivery_routes, delivery_route_locations, trucks, employees, order_deliveries. Table products has columns such as product_id, product_name, product_price, product_description. product_id is the primary key. Table addresses has columns such as address_id, address_details, city, zip_postcode, state_province_county, country. address_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, date_became_customer. customer_id is the primary key. Table regular_orders has columns such as regular_order_id, distributer_id. regular_order_id is the primary key. Table regular_order_products has columns such as regular_order_id, product_id. is the primary key. Table actual_orders has columns such as actual_order_id, order_status_code, regular_order_id, actual_order_date. actual_order_id is the primary key. Table actual_order_products has columns such as actual_order_id, product_id. is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, address_type, date_to. is the primary key. Table delivery_routes has columns such as route_id, route_name, other_route_details. route_id is the primary key. Table delivery_route_locations has columns such as location_code, route_id, location_address_id, location_name. location_code is the primary key. Table trucks has columns such as truck_id, truck_licence_number, truck_details. truck_id is the primary key. Table employees has columns such as employee_id, employee_address_id, employee_name, employee_phone. employee_id is the primary key. Table order_deliveries has columns such as location_code, actual_order_id, delivery_status_code, driver_employee_id, truck_id, delivery_date. is the primary key. The distributer_id of regular_orders is the foreign key of customer_id of customers. The regular_order_id of regular_order_products is the foreign key of regular_order_id of regular_orders. The product_id of regular_order_products is the foreign key of product_id of products. The regular_order_id of actual_orders is the foreign key of regular_order_id of regular_orders. The actual_order_id of actual_order_products is the foreign key of actual_order_id of actual_orders. The product_id of actual_order_products is the foreign key of product_id of products. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The route_id of delivery_route_locations is the foreign key of route_id of delivery_routes. The location_address_id of delivery_route_locations is the foreign key of address_id of addresses. The employee_address_id of employees is the foreign key of address_id of addresses. The driver_employee_id of order_deliveries is the foreign key of employee_id of employees. The location_code of order_deliveries is the foreign key of location_code of delivery_route_locations. The actual_order_id of order_deliveries is the foreign key of actual_order_id of actual_orders. The truck_id of order_deliveries is the foreign key of truck_id of trucks.", "input": "List the state names and the number of customers living in each state.", "output": "select t2.state_province_county, count(*) from customer_addresses as t1 join addresses as t2 on t1.address_id = t2.address_id group by t2.state_province_county"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "How many authors are there?", "output": "select count(*) from authors"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Count the number of authors.", "output": "select count(*) from authors"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "How many institutions are there?", "output": "select count(*) from inst"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Count the number of institutions.", "output": "select count(*) from inst"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "How many papers are published in total?", "output": "select count(*) from papers"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Count the number of total papers.", "output": "select count(*) from papers"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Gibbons.The fname contains values such as Jeremy. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What are the titles of papers published by \"Jeremy Gibbons\"?", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Jeremy\" and t1.lname = \"Gibbons\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Gibbons.The fname contains values such as Jeremy. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the titles of all the papers written by \"Jeremy Gibbons\"", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Jeremy\" and t1.lname = \"Gibbons\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Turon.The fname contains values such as Aaron. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find all the papers published by \"Aaron Turon\".", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Aaron\" and t1.lname = \"Turon\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Turon.The fname contains values such as Aaron. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the titles of all the papers written by \"Aaron Turon\".", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Aaron\" and t1.lname = \"Turon\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ohori.The fname contains values such as Atsushi. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "How many papers have \"Atsushi Ohori\" published?", "output": "select count(*) from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Atsushi\" and t1.lname = \"Ohori\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ohori.The fname contains values such as Atsushi. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "How many papers are \"Atsushi Ohori\" the author of?", "output": "select count(*) from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Atsushi\" and t1.lname = \"Ohori\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Blume.The fname contains values such as Matthias. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What is the name of the institution that \"Matthias Blume\" belongs to?", "output": "select distinct t3.name from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t1.fname = \"Matthias\" and t1.lname = \"Blume\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Blume.The fname contains values such as Matthias. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which institution is the author \"Matthias Blume\" belong to? Give me the name of the institution.", "output": "select distinct t3.name from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t1.fname = \"Matthias\" and t1.lname = \"Blume\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ueno.The fname contains values such as Katsuhiro. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which institution does \"Katsuhiro Ueno\" belong to?", "output": "select distinct t3.name from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t1.fname = \"Katsuhiro\" and t1.lname = \"Ueno\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ueno.The fname contains values such as Katsuhiro. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What is the name of the institution the author \"Katsuhiro Ueno\" belongs to?", "output": "select distinct t3.name from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t1.fname = \"Katsuhiro\" and t1.lname = \"Ueno\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as University of Oxford. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Who belong to the institution \"University of Oxford\"? Show the first names and last names.", "output": "select distinct t1.fname, t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t3.name = \"University of Oxford\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as University of Oxford. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the first names and last names of the authors whose institution affiliation is \"University of Oxford\".", "output": "select distinct t1.fname, t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t3.name = \"University of Oxford\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as Google. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which authors belong to the institution \"Google\"? Show the first names and last names.", "output": "select distinct t1.fname, t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t3.name = \"Google\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as Google. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the first names and last names of the authors whose institution affiliation is \"Google\".", "output": "select distinct t1.fname, t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join inst as t3 on t2.instid = t3.instid where t3.name = \"Google\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. The title contains values such as Binders Unbound. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What are the last names of the author of the paper titled \"Binders Unbound\"?", "output": "select t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title = \"Binders Unbound\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. The title contains values such as Binders Unbound. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Who is the author of the paper titled \"Binders Unbound\"? Give me the last name.", "output": "select t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title = \"Binders Unbound\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. The title contains values such as Nameless, Painless. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the first and last name of the author(s) who wrote the paper \"Nameless, Painless\".", "output": "select t1.fname, t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title = \"Nameless, Painless\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. The title contains values such as Nameless, Painless. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What are the first and last name of the author who published the paper titled \"Nameless, Painless\"?", "output": "select t1.fname, t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title = \"Nameless, Painless\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as Indiana University. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What are the papers published under the institution \"Indiana University\"?", "output": "select distinct t1.title from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"Indiana University\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as Indiana University. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "List the titles of the papers whose authors are from the institution \"Indiana University\".", "output": "select distinct t1.title from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"Indiana University\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as Google. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find all the papers published by the institution \"Google\".", "output": "select distinct t1.title from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"Google\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as Google. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which papers were written by authors from the institution \"Google\"?", "output": "select distinct t1.title from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"Google\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "How many papers are published by the institution \"Tokohu University\"?", "output": "select count(distinct t1.title) from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"Tokohu University\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the number of papers published by authors from the institution \"Tokohu University\".", "output": "select count(distinct t1.title) from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"Tokohu University\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as University of Pennsylvania. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the number of papers published by the institution \"University of Pennsylvania\".", "output": "select count(distinct t1.title) from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"University of Pennsylvania\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The name contains values such as University of Pennsylvania. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "How many papers are written by authors from the institution \"University of Pennsylvania\"?", "output": "select count(distinct t1.title) from papers as t1 join authorship as t2 on t1.paperid = t2.paperid join inst as t3 on t2.instid = t3.instid where t3.name = \"University of Pennsylvania\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Shivers.The fname contains values such as Olin. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the papers which have \"Olin Shivers\" as an author.", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Olin\" and t1.lname = \"Shivers\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Shivers.The fname contains values such as Olin. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which papers did the author \"Olin Shivers\" write? Give me the paper titles.", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Olin\" and t1.lname = \"Shivers\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Weirich.The fname contains values such as Stephanie. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which papers have \"Stephanie Weirich\" as an author?", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Stephanie\" and t1.lname = \"Weirich\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Weirich.The fname contains values such as Stephanie. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the titles of the papers the author \"Stephanie Weirich\" wrote.", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t1.fname = \"Stephanie\" and t1.lname = \"Weirich\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The country contains values such as USA. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Turon. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which paper is published in an institution in \"USA\" and have \"Turon\" as its second author?", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid join inst as t4 on t2.instid = t4.instid where t4.country = \"USA\" and t2.authorder = 2 and t1.lname = \"Turon\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The country contains values such as USA. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Turon. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find papers whose second author has last name \"Turon\" and is affiliated with an institution in the country \"USA\".", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid join inst as t4 on t2.instid = t4.instid where t4.country = \"USA\" and t2.authorder = 2 and t1.lname = \"Turon\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The country contains values such as Japan. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ohori. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the titles of papers whose first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"?", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid join inst as t4 on t2.instid = t4.instid where t4.country = \"Japan\" and t2.authorder = 1 and t1.lname = \"Ohori\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. The country contains values such as Japan. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ohori. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which papers' first author is affiliated with an institution in the country \"Japan\" and has last name \"Ohori\"? Give me the titles of the papers.", "output": "select t3.title from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid join inst as t4 on t2.instid = t4.instid where t4.country = \"Japan\" and t2.authorder = 1 and t1.lname = \"Ohori\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What is the last name of the author that has published the most papers?", "output": "select t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid group by t1.fname, t1.lname order by count(*) desc limit 1"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which author has written the most papers? Find his or her last name.", "output": "select t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid group by t1.fname, t1.lname order by count(*) desc limit 1"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Retrieve the country that has published the most papers.", "output": "select t1.country from inst as t1 join authorship as t2 on t1.instid = t2.instid join papers as t3 on t2.paperid = t3.paperid group by t1.country order by count(*) desc limit 1"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the country that the most papers are affiliated with.", "output": "select t1.country from inst as t1 join authorship as t2 on t1.instid = t2.instid join papers as t3 on t2.paperid = t3.paperid group by t1.country order by count(*) desc limit 1"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the name of the organization that has published the largest number of papers.", "output": "select t1.name from inst as t1 join authorship as t2 on t1.instid = t2.instid join papers as t3 on t2.paperid = t3.paperid group by t1.name order by count(*) desc limit 1"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which institution has the most papers? Find the name of the institution.", "output": "select t1.name from inst as t1 join authorship as t2 on t1.instid = t2.instid join papers as t3 on t2.paperid = t3.paperid group by t1.name order by count(*) desc limit 1"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the titles of the papers that contain the word \"ML\".", "output": "select title from papers where title like \"%ml%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which papers have the substring \"ML\" in their titles? Return the titles of the papers.", "output": "select title from papers where title like \"%ml%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which paper's title contains the word \"Database\"?", "output": "select title from papers where title like \"%database%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which papers have the substring \"Database\" in their titles? Show the titles of the papers.", "output": "select title from papers where title like \"%database%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the first names of all the authors who have written a paper with title containing the word \"Functional\".", "output": "select t1.fname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title like \"%functional%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Who has written a paper that has the word \"Functional\" in its title? Return the first names of the authors.", "output": "select t1.fname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title like \"%functional%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the last names of all the authors that have written a paper with title containing the word \"Monadic\".", "output": "select t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title like \"%monadic%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which authors have written a paper with title containing the word \"Monadic\"? Return their last names.", "output": "select t1.lname from authors as t1 join authorship as t2 on t1.authid = t2.authid join papers as t3 on t2.paperid = t3.paperid where t3.title like \"%monadic%\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Retrieve the title of the paper that has the largest number of authors.", "output": "select t2.title from authorship as t1 join papers as t2 on t1.paperid = t2.paperid where t1.authorder = (select max(authorder) from authorship)"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which paper has the most authors? Give me the paper title.", "output": "select t2.title from authorship as t1 join papers as t2 on t1.paperid = t2.paperid where t1.authorder = (select max(authorder) from authorship)"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ueno. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "What is the first name of the author with last name \"Ueno\"?", "output": "select fname from authors where lname = \"Ueno\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The lname contains values such as Ueno. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which authors have last name \"Ueno\"? List their first names.", "output": "select fname from authors where lname = \"Ueno\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The fname contains values such as Amal. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the last name of the author with first name \"Amal\".", "output": "select lname from authors where fname = \"Amal\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. The fname contains values such as Amal. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Which authors have first name \"Amal\"? List their last names.", "output": "select lname from authors where fname = \"Amal\""}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Find the first names of all the authors ordered in alphabetical order.", "output": "select fname from authors order by fname"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Sort the first names of all the authors in alphabetical order.", "output": "select fname from authors order by fname"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Retrieve all the last names of authors in alphabetical order.", "output": "select lname from authors order by lname"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Give me a list of all the last names of authors sorted in alphabetical order", "output": "select lname from authors order by lname"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Retrieve all the first and last names of authors in the alphabetical order of last names.", "output": "select fname, lname from authors order by lname"}, {"instruction": "icfp_1 contains tables such as inst, authors, papers, authorship. Table inst has columns such as instid, name, country. instid is the primary key. Table authors has columns such as authid, lname, fname. authid is the primary key. Table papers has columns such as paperid, title. paperid is the primary key. Table authorship has columns such as authid, instid, paperid, authorder. authid is the primary key. The paperid of authorship is the foreign key of paperid of papers. The instid of authorship is the foreign key of instid of inst. The authid of authorship is the foreign key of authid of authors.", "input": "Sort the list of all the first and last names of authors in alphabetical order of the last names.", "output": "select fname, lname from authors order by lname"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many different last names do the actors and actresses have?", "output": "select count(distinct last_name) from actor"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of different last names actors have.", "output": "select count(distinct last_name) from actor"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the most popular first name of the actors?", "output": "select first_name from actor group by first_name order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the most common first name among all actors.", "output": "select first_name from actor group by first_name order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the most popular full name of the actors?", "output": "select first_name, last_name from actor group by first_name, last_name order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the most common full name among all actors.", "output": "select first_name, last_name from actor group by first_name, last_name order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which districts have at least two addresses?", "output": "select district from address group by district having count(*) >= 2"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Give the districts which have two or more addresses.", "output": "select district from address group by district having count(*) >= 2"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. The address contains values such as 1031 Daugavpils Parkway.The district contains values such as Daugavpils. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. The city contains values such as Daugavpils. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the phone number and postal code of the address 1031 Daugavpils Parkway?", "output": "select phone, postal_code from address where address = '1031 daugavpils Parkway'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. The address contains values such as 1031 Daugavpils Parkway.The district contains values such as Daugavpils. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. The city contains values such as Daugavpils. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Give the phone and postal code corresponding to the address '1031 Daugavpils Parkway'.", "output": "select phone, postal_code from address where address = '1031 daugavpils Parkway'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which city has the most addresses? List the city name, number of addresses, and city id.", "output": "select t2.city, count(*), t1.city_id from address as t1 join city as t2 on t1.city_id = t2.city_id group by t1.city_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the city name, id, and number of addresses corresponding to the city with the most addressed?", "output": "select t2.city, count(*), t1.city_id from address as t1 join city as t2 on t1.city_id = t2.city_id group by t1.city_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. The district contains values such as California. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many addresses are in the district of California?", "output": "select count(*) from address where district = 'California'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. The district contains values such as California. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of addressed in the California district.", "output": "select count(*) from address where district = 'California'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which film is rented at a fee of 0.99 and has less than 3 in the inventory? List the film title and id.", "output": "select title, film_id from film where rental_rate = 0.99 intersect select t1.title, t1.film_id from film as t1 join inventory as t2 on t1.film_id = t2.film_id group by t1.film_id having count(*) < 3"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the title and id of the film which has a rental rate of 0.99 and an inventory of below 3?", "output": "select title, film_id from film where rental_rate = 0.99 intersect select t1.title, t1.film_id from film as t1 join inventory as t2 on t1.film_id = t2.film_id group by t1.film_id having count(*) < 3"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. The country contains values such as Australia. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many cities are in Australia?", "output": "select count(*) from city as t1 join country as t2 on t1.country_id = t2.country_id where t2.country = 'Australia'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. The country contains values such as Australia. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of cities in Australia.", "output": "select count(*) from city as t1 join country as t2 on t1.country_id = t2.country_id where t2.country = 'Australia'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which countries have at least 3 cities?", "output": "select t2.country from city as t1 join country as t2 on t1.country_id = t2.country_id group by t2.country_id having count(*) >= 3"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the countries that contain 3 or more cities?", "output": "select t2.country from city as t1 join country as t2 on t1.country_id = t2.country_id group by t2.country_id having count(*) >= 3"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.", "output": "select payment_date from payment where amount > 10 union select t1.payment_date from payment as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = 'Elsa'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the payment dates for any payments that have an amount greater than 10 or were handled by a staff member with the first name Elsa?", "output": "select payment_date from payment where amount > 10 union select t1.payment_date from payment as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = 'Elsa'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many customers have an active value of 1?", "output": "select count(*) from customer where active = '1'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of customers who are active.", "output": "select count(*) from customer where active = '1'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which film has the highest rental rate? And what is the rate?", "output": "select title, rental_rate from film order by rental_rate desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the title and rental rate of the film with the highest rental rate?", "output": "select title, rental_rate from film order by rental_rate desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which film has the most number of actors or actresses? List the film name, film id and description.", "output": "select t2.title, t2.film_id, t2.description from film_actor as t1 join film as t2 on t1.film_id = t2.film_id group by t2.film_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the title, id, and description of the movie with the greatest number of actors?", "output": "select t2.title, t2.film_id, t2.description from film_actor as t1 join film as t2 on t1.film_id = t2.film_id group by t2.film_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which film actor (actress) starred the most films? List his or her first name, last name and actor id.", "output": "select t2.first_name, t2.last_name, t2.actor_id from film_actor as t1 join actor as t2 on t1.actor_id = t2.actor_id group by t2.actor_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the full name and id of the actor or actress who starred in the greatest number of films.", "output": "select t2.first_name, t2.last_name, t2.actor_id from film_actor as t1 join actor as t2 on t1.actor_id = t2.actor_id group by t2.actor_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which film actors (actresses) played a role in more than 30 films? List his or her first name and last name.", "output": "select t2.first_name, t2.last_name from film_actor as t1 join actor as t2 on t1.actor_id = t2.actor_id group by t2.actor_id having count(*) > 30"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the full names of actors who had roles in more than 30 films?", "output": "select t2.first_name, t2.last_name from film_actor as t1 join actor as t2 on t1.actor_id = t2.actor_id group by t2.actor_id having count(*) > 30"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which store owns most items?", "output": "select store_id from inventory group by store_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the id of the store that has the most items in inventory?", "output": "select store_id from inventory group by store_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the total amount of all payments?", "output": "select sum(amount) from payment"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. The district contains values such as Sumy. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. The city contains values such as Sumy. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the sum of all payment amounts.", "output": "select sum(amount) from payment"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which customer, who has made at least one payment, has spent the least money? List his or her first name, last name, and the id.", "output": "select t1.first_name, t1.last_name, t1.customer_id from customer as t1 join payment as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by sum(amount) asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the full name and id of the customer who has the lowest total amount of payment?", "output": "select t1.first_name, t1.last_name, t1.customer_id from customer as t1 join payment as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by sum(amount) asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The title contains values such as HUNGER ROOF. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the genre name of the film HUNGER ROOF?", "output": "select t1.name from category as t1 join film_category as t2 on t1.category_id = t2.category_id join film as t3 on t2.film_id = t3.film_id where t3.title = 'HUNGER ROOF'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The title contains values such as HUNGER ROOF. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the name of the category to which the film 'HUNGER ROOF' belongs.", "output": "select t1.name from category as t1 join film_category as t2 on t1.category_id = t2.category_id join film as t3 on t2.film_id = t3.film_id where t3.title = 'HUNGER ROOF'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many films are there in each category? List the genre name, genre id and the count.", "output": "select t2.name, t1.category_id, count(*) from film_category as t1 join category as t2 on t1.category_id = t2.category_id group by t1.category_id"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the names and ids of the different categories, and how many films are in each?", "output": "select t2.name, t1.category_id, count(*) from film_category as t1 join category as t2 on t1.category_id = t2.category_id group by t1.category_id"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which film has the most copies in the inventory? List both title and id.", "output": "select t1.title, t1.film_id from film as t1 join inventory as t2 on t1.film_id = t2.film_id group by t1.film_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the title and id of the film that has the greatest number of copies in inventory?", "output": "select t1.title, t1.film_id from film as t1 join inventory as t2 on t1.film_id = t2.film_id group by t1.film_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the film title and inventory id of the item in the inventory which was rented most frequently?", "output": "select t1.title, t2.inventory_id from film as t1 join inventory as t2 on t1.film_id = t2.film_id join rental as t3 on t2.inventory_id = t3.inventory_id group by t2.inventory_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the title and inventory id of the film that is rented most often.", "output": "select t1.title, t2.inventory_id from film as t1 join inventory as t2 on t1.film_id = t2.film_id join rental as t3 on t2.inventory_id = t3.inventory_id group by t2.inventory_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many languages are in these films?", "output": "select count(distinct language_id) from film"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of different languages in these films.", "output": "select count(distinct language_id) from film"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are all the movies rated as R? List the titles.", "output": "select title from film where rating = 'R'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the titles of any movies with an R rating.", "output": "select title from film where rating = 'R'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Where is store 1 located?", "output": "select t2.address from store as t1 join address as t2 on t1.address_id = t2.address_id where store_id = 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the address of store 1.", "output": "select t2.address from store as t1 join address as t2 on t1.address_id = t2.address_id where store_id = 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which staff handled least number of payments? List the full name and the id.", "output": "select t1.first_name, t1.last_name, t1.staff_id from staff as t1 join payment as t2 on t1.staff_id = t2.staff_id group by t1.staff_id order by count(*) asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Give the full name and staff id of the staff who has handled the fewest payments.", "output": "select t1.first_name, t1.last_name, t1.staff_id from staff as t1 join payment as t2 on t1.staff_id = t2.staff_id group by t1.staff_id order by count(*) asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The title contains values such as AIRPORT POLLOCK. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which language does the film AIRPORT POLLOCK use? List the language name.", "output": "select t2.name from film as t1 join language as t2 on t1.language_id = t2.language_id where t1.title = 'AIRPORT POLLOCK'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The title contains values such as AIRPORT POLLOCK. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the name of the language that the film 'AIRPORT POLLOCK' is in?", "output": "select t2.name from film as t1 join language as t2 on t1.language_id = t2.language_id where t1.title = 'AIRPORT POLLOCK'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many stores are there?", "output": "select count(*) from store"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of stores.", "output": "select count(*) from store"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many kinds of different ratings are listed?", "output": "select count(distinct rating) from film"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of different film ratings.", "output": "select count(distinct rating) from film"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The special_features contains values such as Deleted Scenes. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which movies have 'Deleted Scenes' as a substring in the special feature?", "output": "select title from film where special_features like '%deleted scenes%'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The special_features contains values such as Deleted Scenes. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the titles of films that include 'Deleted Scenes' in their special feature section.", "output": "select title from film where special_features like '%deleted scenes%'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "How many items in inventory does store 1 have?", "output": "select count(*) from inventory where store_id = 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Count the number of items store 1 has in stock.", "output": "select count(*) from inventory where store_id = 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "When did the first payment happen?", "output": "select payment_date from payment order by payment_date asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What was the date of the earliest payment?", "output": "select payment_date from payment order by payment_date asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. The first_name contains values such as LINDA. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Where does the customer with the first name Linda live? And what is her email?", "output": "select t2.address, t1.email from customer as t1 join address as t2 on t2.address_id = t1.address_id where t1.first_name = 'LINDA'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. The first_name contains values such as LINDA. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the address and email of the customer with the first name Linda.", "output": "select t2.address, t1.email from customer as t1 join address as t2 on t2.address_id = t1.address_id where t1.first_name = 'LINDA'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The rating contains values such as PG. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.", "output": "select title from film where length > 100 or rating = 'PG' except select title from film where replacement_cost > 200"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. The rating contains values such as PG. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?", "output": "select title from film where length > 100 or rating = 'PG' except select title from film where replacement_cost > 200"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the first name and the last name of the customer who made the earliest rental?", "output": "select t1.first_name, t1.last_name from customer as t1 join rental as t2 on t1.customer_id = t2.customer_id order by t2.rental_date asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the full name of the customer who made the first rental.", "output": "select t1.first_name, t1.last_name from customer as t1 join rental as t2 on t1.customer_id = t2.customer_id order by t2.rental_date asc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. The first_name contains values such as APRIL.The last_name contains values such as BURNS. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?", "output": "select distinct t1.first_name, t1.last_name from staff as t1 join rental as t2 on t1.staff_id = t2.staff_id join customer as t3 on t2.customer_id = t3.customer_id where t3.first_name = 'APRIL' and t3.last_name = 'BURNS'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. The first_name contains values such as APRIL.The last_name contains values such as BURNS. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.", "output": "select distinct t1.first_name, t1.last_name from staff as t1 join rental as t2 on t1.staff_id = t2.staff_id join customer as t3 on t2.customer_id = t3.customer_id where t3.first_name = 'APRIL' and t3.last_name = 'BURNS'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Which store has most the customers?", "output": "select store_id from customer group by store_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the id of the store with the most customers.", "output": "select store_id from customer group by store_id order by count(*) desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What is the largest payment amount?", "output": "select amount from payment order by amount desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the amount of the largest payment.", "output": "select amount from payment order by amount desc limit 1"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Where does the staff member with the first name Elsa live?", "output": "select t2.address from staff as t1 join address as t2 on t1.address_id = t2.address_id where t1.first_name = 'Elsa'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Give the address of the staff member who has the first name Elsa.", "output": "select t2.address from staff as t1 join address as t2 on t1.address_id = t2.address_id where t1.first_name = 'Elsa'"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. The payment_date contains values such as 2005-08-23 02:06:01, 2005-08-23 02:06:41. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. The rental_date contains values such as 2005-08-23 02:06:01, 2005-08-23 02:06:41.The return_date contains values such as 2005-08-23 02:06:11. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?", "output": "select first_name from customer where customer_id not in( select customer_id from rental where rental_date > '2005-08-23 02:06:01' )"}, {"instruction": "sakila_1 contains tables such as actor, address, category, city, country, customer, film, film_actor, film_category, film_text, inventory, language, payment, rental, staff, store. Table actor has columns such as actor_id, first_name, last_name, last_update. actor_id is the primary key. Table address has columns such as address_id, address, address2, district, city_id, postal_code, phone, last_update. address_id is the primary key. Table category has columns such as category_id, name, last_update. category_id is the primary key. Table city has columns such as city_id, city, country_id, last_update. city_id is the primary key. Table country has columns such as country_id, country, last_update. country_id is the primary key. Table customer has columns such as customer_id, store_id, first_name, last_name, email, address_id, active, create_date, last_update. customer_id is the primary key. Table film has columns such as film_id, title, description, release_year, language_id, original_language_id, rental_duration, rental_rate, length, replacement_cost, rating, special_features, last_update. film_id is the primary key. Table film_actor has columns such as actor_id, film_id, last_update. actor_id is the primary key. Table film_category has columns such as film_id, category_id, last_update. film_id is the primary key. Table film_text has columns such as film_id, title, description. film_id is the primary key. Table inventory has columns such as inventory_id, film_id, store_id, last_update. inventory_id is the primary key. Table language has columns such as language_id, name, last_update. language_id is the primary key. Table payment has columns such as payment_id, customer_id, staff_id, rental_id, amount, payment_date, last_update. payment_id is the primary key. The payment_date contains values such as 2005-08-23 02:06:01, 2005-08-23 02:06:41. Table rental has columns such as rental_id, rental_date, inventory_id, customer_id, return_date, staff_id, last_update. rental_id is the primary key. The rental_date contains values such as 2005-08-23 02:06:01, 2005-08-23 02:06:41.The return_date contains values such as 2005-08-23 02:06:11. Table staff has columns such as staff_id, first_name, last_name, address_id, picture, email, store_id, active, username, password, last_update. staff_id is the primary key. Table store has columns such as store_id, manager_staff_id, address_id, last_update. store_id is the primary key. The city_id of address is the foreign key of city_id of city. The country_id of city is the foreign key of country_id of country. The store_id of customer is the foreign key of store_id of store. The address_id of customer is the foreign key of address_id of address. The original_language_id of film is the foreign key of language_id of language. The language_id of film is the foreign key of language_id of language. The film_id of film_actor is the foreign key of film_id of film. The actor_id of film_actor is the foreign key of actor_id of actor. The category_id of film_category is the foreign key of category_id of category. The film_id of film_category is the foreign key of film_id of film. The film_id of inventory is the foreign key of film_id of film. The store_id of inventory is the foreign key of store_id of store. The staff_id of payment is the foreign key of staff_id of staff. The customer_id of payment is the foreign key of customer_id of customer. The rental_id of payment is the foreign key of rental_id of rental. The customer_id of rental is the foreign key of customer_id of customer. The inventory_id of rental is the foreign key of inventory_id of inventory. The staff_id of rental is the foreign key of staff_id of staff. The address_id of staff is the foreign key of address_id of address. The address_id of store is the foreign key of address_id of address. The manager_staff_id of store is the foreign key of staff_id of staff.", "input": "Return the first names of customers who did not rented a film after the date '2005-08-23 02:06:01'.", "output": "select first_name from customer where customer_id not in( select customer_id from rental where rental_date > '2005-08-23 02:06:01' )"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "How many bank branches are there?", "output": "select count(*) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Count the number of bank branches.", "output": "select count(*) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "How many customers are there?", "output": "select sum(no_of_customers) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the total number of customers across banks?", "output": "select sum(no_of_customers) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The city contains values such as New York City.The state contains values such as New York. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as New York. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the number of customers in the banks at New York City.", "output": "select sum(no_of_customers) from bank where city = 'New york City'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The city contains values such as New York City.The state contains values such as New York. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as New York. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the total number of customers who use banks in New York City?", "output": "select sum(no_of_customers) from bank where city = 'New york City'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as Utah. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as Utah. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the average number of customers in all banks of Utah state.", "output": "select avg(no_of_customers) from bank where state = 'Utah'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as Utah. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as Utah. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the average number of customers across banks in the state of Utah?", "output": "select avg(no_of_customers) from bank where state = 'Utah'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the average number of customers cross all banks.", "output": "select avg(no_of_customers) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the average number of bank customers?", "output": "select avg(no_of_customers) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The bname contains values such as morningside. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the city and state of the bank branch named morningside.", "output": "select city, state from bank where bname = 'morningside'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The bname contains values such as morningside. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What city and state is the bank with the name morningside in?", "output": "select city, state from bank where bname = 'morningside'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as New York. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as New York. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the branch names of banks in the New York state.", "output": "select bname from bank where state = 'New York'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as New York. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as New York. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of banks in the state of New York?", "output": "select bname from bank where state = 'New York'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "List the name of all customers sorted by their account balance in ascending order.", "output": "select cust_name from customer order by acc_bal"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of all customers, ordered by account balance?", "output": "select cust_name from customer order by acc_bal"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "List the name of all different customers who have some loan sorted by their total loan amount.", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name order by sum(t2.amount)"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name order by sum(t2.amount)"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the state, account type, and credit score of the customer whose number of loan is 0.", "output": "select state, acc_type, credit_score from customer where no_of_loans = 0"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the states, account types, and credit scores for customers who have 0 loans?", "output": "select state, acc_type, credit_score from customer where no_of_loans = 0"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the number of different cities which banks are located at.", "output": "select count(distinct city) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "In how many different cities are banks located?", "output": "select count(distinct city) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the number of different states which banks are located at.", "output": "select count(distinct state) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "In how many different states are banks located?", "output": "select count(distinct state) from bank"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "How many distinct types of accounts are there?", "output": "select count(distinct acc_type) from customer"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Count the number of different account types.", "output": "select count(distinct acc_type) from customer"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name and account balance of the customer whose name includes the letter \u2018a\u2019.", "output": "select cust_name, acc_bal from customer where cust_name like '%a%'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names and account balances of customers with the letter a in their names?", "output": "select cust_name, acc_bal from customer where cust_name like '%a%'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as Texas, Utah. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as Texas, Utah. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the total account balance of each customer from Utah or Texas.", "output": "select sum(acc_bal) from customer where state = 'Utah' or state = 'Texas'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as Texas, Utah. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as Texas, Utah. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the total account balances for each customer from Utah or Texas?", "output": "select sum(acc_bal) from customer where state = 'Utah' or state = 'Texas'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The acc_type contains values such as checking, saving. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customers who have both saving and checking account types.", "output": "select cust_name from customer where acc_type = 'saving' intersect select cust_name from customer where acc_type = 'checking'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The acc_type contains values such as checking, saving. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of customers who have both savings and checking accounts?", "output": "select cust_name from customer where acc_type = 'saving' intersect select cust_name from customer where acc_type = 'checking'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The acc_type contains values such as saving. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customers who do not have an saving account.", "output": "select cust_name from customer except select cust_name from customer where acc_type = 'saving'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The acc_type contains values such as saving. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of customers who do not have saving accounts?", "output": "select cust_name from customer except select cust_name from customer where acc_type = 'saving'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The loan_type contains values such as Mortgages. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customers who do not have a loan with a type of Mortgages.", "output": "select cust_name from customer except select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where t2.loan_type = 'Mortgages'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of customers who have not taken a Mortage loan?", "output": "select cust_name from customer except select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where t2.loan_type = 'Mortgages'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The loan_type contains values such as Mortgages, Auto. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customers who have loans of both Mortgages and Auto.", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where loan_type = 'Mortgages' intersect select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where loan_type = 'Auto'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The loan_type contains values such as Auto, Mortgages. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of customers who have taken both Mortgage and Auto loans?", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where loan_type = 'Mortgages' intersect select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where loan_type = 'Auto'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customers whose credit score is below the average credit scores of all customers.", "output": "select cust_name from customer where credit_score < (select avg(credit_score) from customer)"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of customers with credit score less than the average credit score across customers?", "output": "select cust_name from customer where credit_score < (select avg(credit_score) from customer)"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the branch name of the bank that has the most number of customers.", "output": "select bname from bank order by no_of_customers desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the name of the bank branch with the greatest number of customers?", "output": "select bname from bank order by no_of_customers desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customer who has the lowest credit score.", "output": "select cust_name from customer order by credit_score limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the name of the customer with the worst credit score?", "output": "select cust_name from customer order by credit_score limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name, account type, and account balance of the customer who has the highest credit score.", "output": "select cust_name, acc_type, acc_bal from customer order by credit_score desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the name, account type, and account balance corresponding to the customer with the highest credit score?", "output": "select cust_name, acc_type, acc_bal from customer order by credit_score desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customer who has the highest amount of loans.", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name order by sum(t2.amount) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the name of the customer who has greatest total loan amount?", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name order by sum(t2.amount) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the state which has the most number of customers.", "output": "select state from bank group by state order by sum(no_of_customers) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Which state has the greatest total number of bank customers?", "output": "select state from bank group by state order by sum(no_of_customers) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "For each account type, find the average account balance of customers with credit score lower than 50.", "output": "select avg(acc_bal), acc_type from customer where credit_score < 50 group by acc_type"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the average account balance of customers with credit score below 50 for the different account types?", "output": "select avg(acc_bal), acc_type from customer where credit_score < 50 group by acc_type"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "For each state, find the total account balance of customers whose credit score is above 100.", "output": "select sum(acc_bal), state from customer where credit_score > 100 group by state"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the total account balance for customers with a credit score of above 100 for the different states?", "output": "select sum(acc_bal), state from customer where credit_score > 100 group by state"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the total amount of loans offered by each bank branch.", "output": "select sum(amount), t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id group by t1.bname"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of the different bank branches, and what are their total loan amounts?", "output": "select sum(amount), t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id group by t1.bname"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of customers who have more than one loan.", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name having count(*) > 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of customers who have taken out more than one loan?", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name having count(*) > 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name and account balance of the customers who have loans with a total amount of more than 5000.", "output": "select t1.cust_name, t1.acc_type from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name having sum(t2.amount) > 5000"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?", "output": "select t1.cust_name, t1.acc_type from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id group by t1.cust_name having sum(t2.amount) > 5000"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of bank branch that provided the greatest total amount of loans.", "output": "select t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id group by t1.bname order by sum(t2.amount) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the name of the bank branch that has lent the greatest amount?", "output": "select t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id group by t1.bname order by sum(t2.amount) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of bank branch that provided the greatest total amount of loans to customers with credit score is less than 100.", "output": "select t2.bname from loan as t1 join bank as t2 on t1.branch_id = t2.branch_id join customer as t3 on t1.cust_id = t3.cust_id where t3.credit_score < 100 group by t2.bname order by sum(t1.amount) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the name of the bank branch that has lended the largest total amount in loans, specifically to customers with credit scores below 100?", "output": "select t2.bname from loan as t1 join bank as t2 on t1.branch_id = t2.branch_id join customer as t3 on t1.cust_id = t3.cust_id where t3.credit_score < 100 group by t2.bname order by sum(t1.amount) desc limit 1"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name of bank branches that provided some loans.", "output": "select distinct t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of the different banks that have provided loans?", "output": "select distinct t1.bname from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the name and credit score of the customers who have some loans.", "output": "select distinct t1.cust_name, t1.credit_score from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the different names and credit scores of customers who have taken a loan?", "output": "select distinct t1.cust_name, t1.credit_score from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the the name of the customers who have a loan with amount more than 3000.", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where amount > 3000"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of customers who have a loan of more than 3000 in amount?", "output": "select t1.cust_name from customer as t1 join loan as t2 on t1.cust_id = t2.cust_id where amount > 3000"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The loan_type contains values such as Business. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the city and name of bank branches that provide business loans.", "output": "select t1.bname, t1.city from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id where t2.loan_type = 'Business'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The loan_type contains values such as Business. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names and cities of bank branches that offer loans for business?", "output": "select t1.bname, t1.city from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id where t2.loan_type = 'Business'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the names of bank branches that have provided a loan to any customer whose credit score is below 100.", "output": "select t2.bname from loan as t1 join bank as t2 on t1.branch_id = t2.branch_id join customer as t3 on t1.cust_id = t3.cust_id where t3.credit_score < 100"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What are the names of banks that have loaned money to customers with credit scores below 100?", "output": "select t2.bname from loan as t1 join bank as t2 on t1.branch_id = t2.branch_id join customer as t3 on t1.cust_id = t3.cust_id where t3.credit_score < 100"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as New York. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as New York. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the total amount of loans provided by bank branches in the state of New York.", "output": "select sum(t2.amount) from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id where t1.state = 'New York'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. The state contains values such as New York. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. The state contains values such as New York. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the total amount of money loaned by banks in New York state?", "output": "select sum(t2.amount) from bank as t1 join loan as t2 on t1.branch_id = t2.branch_id where t1.state = 'New York'"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the average credit score of the customers who have some loan.", "output": "select avg(credit_score) from customer where cust_id in (select cust_id from loan)"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the average credit score for customers who have taken a loan?", "output": "select avg(credit_score) from customer where cust_id in (select cust_id from loan)"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "Find the average credit score of the customers who do not have any loan.", "output": "select avg(credit_score) from customer where cust_id not in (select cust_id from loan)"}, {"instruction": "loan_1 contains tables such as bank, customer, loan. Table bank has columns such as branch_id, bname, no_of_customers, city, state. branch_id is the primary key. Table customer has columns such as cust_id, cust_name, acc_type, acc_bal, no_of_loans, credit_score, branch_id, state. cust_id is the primary key. Table loan has columns such as loan_id, loan_type, cust_id, branch_id, amount. loan_id is the primary key. The branch_id of customer is the foreign key of branch_id of bank. The branch_id of loan is the foreign key of branch_id of bank.", "input": "What is the average credit score for customers who have never taken a loan?", "output": "select avg(credit_score) from customer where cust_id not in (select cust_id from loan)"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "How many assessment notes are there in total?", "output": "select count(*) from assessment_notes"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the dates of the assessment notes?", "output": "select date_of_notes from assessment_notes"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "How many addresses have zip code 197?", "output": "select count(*) from addresses where zip_postcode = \"197\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "How many distinct incident type codes are there?", "output": "select count(distinct incident_type_code) from behavior_incident"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Return all distinct detention type codes.", "output": "select distinct detention_type_code from detention"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. The incident_type_code contains values such as NOISE.The incident_type_description contains values such as Noise. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. The incident_type_code contains values such as NOISE. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the start and end dates for incidents with incident type code \"NOISE\"?", "output": "select date_incident_start, date_incident_end from behavior_incident where incident_type_code = \"NOISE\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Return all detention summaries.", "output": "select detention_summary from detention"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Return the cell phone number and email address for all students.", "output": "select cell_mobile_number, email_address from students"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. The first_name contains values such as Emma.The last_name contains values such as Rohan. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What is the email of the student with first name \"Emma\" and last name \"Rohan\"?", "output": "select email_address from students where first_name = \"Emma\" and last_name = \"Rohan\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "How many distinct students have been in detention?", "output": "select count(distinct student_id) from students_in_detention"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. The last_name contains values such as Medhurst. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What is the gender of the teacher with last name \"Medhurst\"?", "output": "select gender from teachers where last_name = \"Medhurst\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. The incident_type_code contains values such as VIOLENCE.The incident_type_description contains values such as Violence. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. The incident_type_code contains values such as VIOLENCE. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What is the incident type description for the incident type with code \"VIOLENCE\"?", "output": "select incident_type_description from ref_incident_type where incident_type_code = \"VIOLENCE\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the maximum and minimum monthly rental for all student addresses.", "output": "select max(monthly_rental), min(monthly_rental) from student_addresses"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the first names of teachers whose email address contains the word \"man\".", "output": "select first_name from teachers where email_address like '%man%'"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "List all information about the assessment notes sorted by date in ascending order.", "output": "select * from assessment_notes order by date_of_notes asc"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "List all cities of addresses in alphabetical order.", "output": "select city from addresses order by city"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the first names and last names of teachers in alphabetical order of last name.", "output": "select first_name, last_name from teachers order by last_name"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find all information about student addresses, and sort by monthly rental in descending order.", "output": "select * from student_addresses order by monthly_rental desc"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the id and first name of the student that has the most number of assessment notes?", "output": "select t1.student_id, t2.first_name from assessment_notes as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the ids and first names of the 3 teachers that have the most number of assessment notes?", "output": "select t1.teacher_id, t2.first_name from assessment_notes as t1 join teachers as t2 on t1.teacher_id = t2.teacher_id group by t1.teacher_id order by count(*) desc limit 3"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the id and last name of the student that has the most behavior incidents?", "output": "select t1.student_id, t2.last_name from behavior_incident as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the id and last name of the teacher that has the most detentions with detention type code \"AFTER\"?", "output": "select t1.teacher_id, t2.last_name from detention as t1 join teachers as t2 on t1.teacher_id = t2.teacher_id where t1.detention_type_code = \"AFTER\" group by t1.teacher_id order by count(*) desc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the id and first name of the student whose addresses have the highest average monthly rental?", "output": "select t1.student_id, t2.first_name from student_addresses as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id order by avg(monthly_rental) desc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the id and city of the student address with the highest average monthly rental.", "output": "select t2.address_id, t1.city from addresses as t1 join student_addresses as t2 on t1.address_id = t2.address_id group by t2.address_id order by avg(monthly_rental) desc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the code and description of the most frequent behavior incident type?", "output": "select t1.incident_type_code, t2.incident_type_description from behavior_incident as t1 join ref_incident_type as t2 on t1.incident_type_code = t2.incident_type_code group by t1.incident_type_code order by count(*) desc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the code and description of the least frequent detention type ?", "output": "select t1.detention_type_code, t2.detention_type_description from detention as t1 join ref_detention_type as t2 on t1.detention_type_code = t2.detention_type_code group by t1.detention_type_code order by count(*) asc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. The first_name contains values such as Fanny. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the dates of assessment notes for students with first name \"Fanny\".", "output": "select t1.date_of_notes from assessment_notes as t1 join students as t2 on t1.student_id = t2.student_id where t2.first_name = \"Fanny\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. The last_name contains values such as Schuster. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the texts of assessment notes for teachers with last name \"Schuster\".", "output": "select t1.text_of_notes from assessment_notes as t1 join teachers as t2 on t1.teacher_id = t2.teacher_id where t2.last_name = \"Schuster\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. The last_name contains values such as Fahey. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the start and end dates of behavior incidents of students with last name \"Fahey\".", "output": "select t1.date_incident_start, date_incident_end from behavior_incident as t1 join students as t2 on t1.student_id = t2.student_id where t2.last_name = \"Fahey\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. The last_name contains values such as Schultz. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the start and end dates of detentions of teachers with last name \"Schultz\".", "output": "select t1.datetime_detention_start, datetime_detention_end from detention as t1 join teachers as t2 on t1.teacher_id = t2.teacher_id where t2.last_name = \"Schultz\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the id and zip code of the address with the highest monthly rental?", "output": "select t2.address_id, t1.zip_postcode from addresses as t1 join student_addresses as t2 on t1.address_id = t2.address_id order by monthly_rental desc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What is the cell phone number of the student whose address has the lowest monthly rental?", "output": "select t2.cell_mobile_number from student_addresses as t1 join students as t2 on t1.student_id = t2.student_id order by t1.monthly_rental asc limit 1"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The state_province_county contains values such as Texas. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the monthly rentals of student addresses in Texas state?", "output": "select t2.monthly_rental from addresses as t1 join student_addresses as t2 on t1.address_id = t2.address_id where t1.state_province_county = \"Texas\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The state_province_county contains values such as Wisconsin. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the first names and last names of students with address in Wisconsin state?", "output": "select t2.first_name, t2.last_name from addresses as t1 join students as t2 on t1.address_id = t2.address_id where t1.state_province_county = \"Wisconsin\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the line 1 and average monthly rentals of all student addresses?", "output": "select t1.line_1, avg(t2.monthly_rental) from addresses as t1 join student_addresses as t2 on t1.address_id = t2.address_id group by t2.address_id"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. The first_name contains values such as Lyla. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What is the zip code of the address where the teacher with first name \"Lyla\" lives?", "output": "select t1.zip_postcode from addresses as t1 join teachers as t2 on t1.address_id = t2.address_id where t2.first_name = \"Lyla\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the email addresses of teachers whose address has zip code \"918\"?", "output": "select t2.email_address from addresses as t1 join teachers as t2 on t1.address_id = t2.address_id where t1.zip_postcode = \"918\""}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "How many students are not involved in any behavior incident?", "output": "select count(*) from students where student_id not in ( select student_id from behavior_incident )"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "Find the last names of teachers who are not involved in any detention.", "output": "select last_name from teachers except select t1.last_name from teachers as t1 join detention as t2 on t1.teacher_id = t2.teacher_id"}, {"instruction": "behavior_monitoring contains tables such as ref_address_types, ref_detention_type, ref_incident_type, addresses, students, teachers, assessment_notes, behavior_incident, detention, student_addresses, students_in_detention. Table ref_address_types has columns such as address_type_code, address_type_description. address_type_code is the primary key. Table ref_detention_type has columns such as detention_type_code, detention_type_description. detention_type_code is the primary key. Table ref_incident_type has columns such as incident_type_code, incident_type_description. incident_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, line_3, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table students has columns such as student_id, address_id, first_name, middle_name, last_name, cell_mobile_number, email_address, date_first_rental, date_left_university, other_student_details. student_id is the primary key. Table teachers has columns such as teacher_id, address_id, first_name, middle_name, last_name, gender, cell_mobile_number, email_address, other_details. teacher_id is the primary key. Table assessment_notes has columns such as notes_id, student_id, teacher_id, date_of_notes, text_of_notes, other_details. is the primary key. Table behavior_incident has columns such as incident_id, incident_type_code, student_id, date_incident_start, date_incident_end, incident_summary, recommendations, other_details. incident_id is the primary key. Table detention has columns such as detention_id, detention_type_code, teacher_id, datetime_detention_start, datetime_detention_end, detention_summary, other_details. detention_id is the primary key. Table student_addresses has columns such as student_id, address_id, date_address_from, date_address_to, monthly_rental, other_details. is the primary key. Table students_in_detention has columns such as student_id, detention_id, incident_id. is the primary key. The address_id of students is the foreign key of address_id of addresses. The address_id of teachers is the foreign key of address_id of addresses. The teacher_id of assessment_notes is the foreign key of teacher_id of teachers. The student_id of assessment_notes is the foreign key of student_id of students. The student_id of behavior_incident is the foreign key of student_id of students. The incident_type_code of behavior_incident is the foreign key of incident_type_code of ref_incident_type. The teacher_id of detention is the foreign key of teacher_id of teachers. The detention_type_code of detention is the foreign key of detention_type_code of ref_detention_type. The student_id of student_addresses is the foreign key of student_id of students. The address_id of student_addresses is the foreign key of address_id of addresses. The student_id of students_in_detention is the foreign key of student_id of students. The detention_id of students_in_detention is the foreign key of detention_id of detention. The incident_id of students_in_detention is the foreign key of incident_id of behavior_incident.", "input": "What are the line 1 of addresses shared by some students and some teachers?", "output": "select t1.line_1 from addresses as t1 join students as t2 on t1.address_id = t2.address_id intersect select t1.line_1 from addresses as t1 join teachers as t2 on t1.address_id = t2.address_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which assets have 2 parts and have less than 2 fault logs? List the asset id and detail.", "output": "select t1.asset_id, t1.asset_details from assets as t1 join asset_parts as t2 on t1.asset_id = t2.asset_id group by t1.asset_id having count(*) = 2 intersect select t1.asset_id, t1.asset_details from assets as t1 join fault_log as t2 on t1.asset_id = t2.asset_id group by t1.asset_id having count(*) < 2"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. The company_type contains values such as Maintenance Contractor. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "How many assets does each maintenance contract contain? List the number and the contract id.", "output": "select count(*), t1.maintenance_contract_id from maintenance_contracts as t1 join assets as t2 on t1.maintenance_contract_id = t2.maintenance_contract_id group by t1.maintenance_contract_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "How many assets does each third party company supply? List the count and the company id.", "output": "select count(*), t1.company_id from third_party_companies as t1 join assets as t2 on t1.company_id = t2.supplier_company_id group by t1.company_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. The company_type contains values such as Maintenance Contractor. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.", "output": "select t1.company_id, t1.company_name from third_party_companies as t1 join maintenance_engineers as t2 on t1.company_id = t2.company_id group by t1.company_id having count(*) >= 2 union select t3.company_id, t3.company_name from third_party_companies as t3 join maintenance_contracts as t4 on t3.company_id = t4.maintenance_contract_company_id group by t3.company_id having count(*) >= 2"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?", "output": "select t1.staff_name, t1.staff_id from staff as t1 join fault_log as t2 on t1.staff_id = t2.recorded_by_staff_id except select t3.staff_name, t3.staff_id from staff as t3 join engineer_visits as t4 on t3.staff_id = t4.contact_staff_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which engineer has visited the most times? Show the engineer id, first name and last name.", "output": "select t1.engineer_id, t1.first_name, t1.last_name from maintenance_engineers as t1 join engineer_visits as t2 group by t1.engineer_id order by count(*) desc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which parts have more than 2 faults? Show the part name and id.", "output": "select t1.part_name, t1.part_id from parts as t1 join part_faults as t2 on t1.part_id = t2.part_id group by t1.part_id having count(*) > 2"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "List all every engineer's first name, last name, details and coresponding skill description.", "output": "select t1.first_name, t1.last_name, t1.other_details, t3.skill_description from maintenance_engineers as t1 join engineer_skills as t2 on t1.engineer_id = t2.engineer_id join skills as t3 on t2.skill_id = t3.skill_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "For all the faults of different parts, what are all the decriptions of the skills required to fix them? List the name of the faults and the skill description.", "output": "select t1.fault_short_name, t3.skill_description from part_faults as t1 join skills_required_to_fix as t2 on t1.part_fault_id = t2.part_fault_id join skills as t3 on t2.skill_id = t3.skill_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "How many assets can each parts be used in? List the part name and the number.", "output": "select t1.part_name, count(*) from parts as t1 join asset_parts as t2 on t1.part_id = t2.part_id group by t1.part_name"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "What are all the fault descriptions and the fault status of all the faults recoreded in the logs?", "output": "select t1.fault_description, t2.fault_status from fault_log as t1 join fault_log_parts as t2 on t1.fault_log_entry_id = t2.fault_log_entry_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "How many engineer visits are required at most for a single fault log? List the number and the log entry id.", "output": "select count(*), t1.fault_log_entry_id from fault_log as t1 join engineer_visits as t2 on t1.fault_log_entry_id = t2.fault_log_entry_id group by t1.fault_log_entry_id order by count(*) desc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "What are all the distinct last names of all the engineers?", "output": "select distinct last_name from maintenance_engineers"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "How many fault status codes are recorded in the fault log parts table?", "output": "select distinct fault_status from fault_log_parts"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which engineers have never visited to maintain the assets? List the engineer first name and last name.", "output": "select first_name, last_name from maintenance_engineers where engineer_id not in (select engineer_id from engineer_visits)"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "List the asset id, details, make and model for every asset.", "output": "select asset_id, asset_details, asset_make, asset_model from assets"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "When was the first asset acquired?", "output": "select asset_acquired_date from assets order by asset_acquired_date asc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which part fault requires the most number of skills to fix? List part id and name.", "output": "select t1.part_id, t1.part_name from parts as t1 join part_faults as t2 on t1.part_id = t2.part_id join skills_required_to_fix as t3 on t2.part_fault_id = t3.part_fault_id group by t1.part_id order by count(*) desc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which kind of part has the least number of faults? List the part name.", "output": "select t1.part_name from parts as t1 join part_faults as t2 on t1.part_id = t2.part_id group by t1.part_name order by count(*) asc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Among those engineers who have visited, which engineer makes the least number of visits? List the engineer id, first name and last name.", "output": "select t1.engineer_id, t1.first_name, t1.last_name from maintenance_engineers as t1 join engineer_visits as t2 on t1.engineer_id = t2.engineer_id group by t1.engineer_id order by count(*) asc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which staff have contacted which engineers? List the staff name and the engineer first name and last name.", "output": "select t1.staff_name, t3.first_name, t3.last_name from staff as t1 join engineer_visits as t2 on t1.staff_id = t2.contact_staff_id join maintenance_engineers as t3 on t2.engineer_id = t3.engineer_id"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which fault log included the most number of faulty parts? List the fault log id, description and record time.", "output": "select t1.fault_log_entry_id, t1.fault_description, t1.fault_log_entry_datetime from fault_log as t1 join fault_log_parts as t2 on t1.fault_log_entry_id = t2.fault_log_entry_id group by t1.fault_log_entry_id order by count(*) desc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which skill is used in fixing the most number of faults? List the skill id and description.", "output": "select t1.skill_id, t1.skill_description from skills as t1 join skills_required_to_fix as t2 on t1.skill_id = t2.skill_id group by t1.skill_id order by count(*) desc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "What are all the distinct asset models?", "output": "select distinct asset_model from assets"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "List the all the assets make, model, details by the disposed date ascendingly.", "output": "select asset_make, asset_model, asset_details from assets order by asset_disposed_date asc"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which part has the least chargeable amount? List the part id and amount.", "output": "select part_id, chargeable_amount from parts order by chargeable_amount asc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. The company_type contains values such as Maintenance Contractor. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which company started the earliest the maintenance contract? Show the company name.", "output": "select t1.company_name from third_party_companies as t1 join maintenance_contracts as t2 on t1.company_id = t2.maintenance_contract_company_id order by t2.contract_start_date asc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "What is the description of the type of the company who concluded its contracts most recently?", "output": "select t1.company_name from third_party_companies as t1 join maintenance_contracts as t2 on t1.company_id = t2.maintenance_contract_company_id join ref_company_types as t3 on t1.company_type_code = t3.company_type_code order by t2.contract_end_date desc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which gender makes up the majority of the staff?", "output": "select gender from staff group by gender order by count(*) desc limit 1"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.", "output": "select t1.staff_name, count(*) from staff as t1 join engineer_visits as t2 on t1.staff_id = t2.contact_staff_id group by t1.staff_name"}, {"instruction": "assets_maintenance contains tables such as third_party_companies, maintenance_contracts, parts, skills, staff, assets, asset_parts, maintenance_engineers, engineer_skills, fault_log, engineer_visits, part_faults, fault_log_parts, skills_required_to_fix. Table third_party_companies has columns such as company_id, company_type, company_name, company_address, other_company_details. company_id is the primary key. Table maintenance_contracts has columns such as maintenance_contract_id, maintenance_contract_company_id, contract_start_date, contract_end_date, other_contract_details. maintenance_contract_id is the primary key. Table parts has columns such as part_id, part_name, chargeable_yn, chargeable_amount, other_part_details. part_id is the primary key. Table skills has columns such as skill_id, skill_code, skill_description. skill_id is the primary key. Table staff has columns such as staff_id, staff_name, gender, other_staff_details. staff_id is the primary key. Table assets has columns such as asset_id, maintenance_contract_id, supplier_company_id, asset_details, asset_make, asset_model, asset_acquired_date, asset_disposed_date, other_asset_details. asset_id is the primary key. Table asset_parts has columns such as asset_id, part_id. is the primary key. Table maintenance_engineers has columns such as engineer_id, company_id, first_name, last_name, other_details. engineer_id is the primary key. Table engineer_skills has columns such as engineer_id, skill_id. is the primary key. Table fault_log has columns such as fault_log_entry_id, asset_id, recorded_by_staff_id, fault_log_entry_datetime, fault_description, other_fault_details. fault_log_entry_id is the primary key. Table engineer_visits has columns such as engineer_visit_id, contact_staff_id, engineer_id, fault_log_entry_id, fault_status, visit_start_datetime, visit_end_datetime, other_visit_details. engineer_visit_id is the primary key. Table part_faults has columns such as part_fault_id, part_id, fault_short_name, fault_description, other_fault_details. part_fault_id is the primary key. Table fault_log_parts has columns such as fault_log_entry_id, part_fault_id, fault_status. is the primary key. Table skills_required_to_fix has columns such as part_fault_id, skill_id. is the primary key. The maintenance_contract_company_id of maintenance_contracts is the foreign key of company_id of third_party_companies. The supplier_company_id of assets is the foreign key of company_id of third_party_companies. The maintenance_contract_id of assets is the foreign key of maintenance_contract_id of maintenance_contracts. The asset_id of asset_parts is the foreign key of asset_id of assets. The part_id of asset_parts is the foreign key of part_id of parts. The company_id of maintenance_engineers is the foreign key of company_id of third_party_companies. The skill_id of engineer_skills is the foreign key of skill_id of skills. The engineer_id of engineer_skills is the foreign key of engineer_id of maintenance_engineers. The recorded_by_staff_id of fault_log is the foreign key of staff_id of staff. The asset_id of fault_log is the foreign key of asset_id of assets. The contact_staff_id of engineer_visits is the foreign key of staff_id of staff. The engineer_id of engineer_visits is the foreign key of engineer_id of maintenance_engineers. The fault_log_entry_id of engineer_visits is the foreign key of fault_log_entry_id of fault_log. The part_id of part_faults is the foreign key of part_id of parts. The fault_log_entry_id of fault_log_parts is the foreign key of fault_log_entry_id of fault_log. The part_fault_id of fault_log_parts is the foreign key of part_fault_id of part_faults. The skill_id of skills_required_to_fix is the foreign key of skill_id of skills. The part_fault_id of skills_required_to_fix is the foreign key of part_fault_id of part_faults.", "input": "Which assets did not incur any fault log? List the asset model.", "output": "select asset_model from assets where asset_id not in (select asset_id from fault_log)"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "list the local authorities and services provided by all stations.", "output": "select local_authority, services from station"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "show all train numbers and names ordered by their time from early to late.", "output": "select train_number, name from train order by time"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. The origin contains values such as Chennai.The destination contains values such as Chennai. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Give me the times and numbers of all trains that go to Chennai, ordered by time.", "output": "select time, train_number from train where destination = 'Chennai' order by time"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "How many trains have 'Express' in their names?", "output": "select count(*) from train where name like \"%express%\""}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. The origin contains values such as Chennai, Guruvayur.The destination contains values such as Chennai, Guruvayur. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find the number and time of the train that goes from Chennai to Guruvayur.", "output": "select train_number, time from train where origin = 'Chennai' and destination = 'Guruvayur'"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find the number of trains starting from each origin.", "output": "select origin, count(*) from train group by origin"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find the name of the train whose route runs through greatest number of stations.", "output": "select t1.name from train as t1 join route as t2 on t1.id = t2.train_id group by t2.train_id order by count(*) desc limit 1"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find the number of trains for each station, as well as the station network name and services.", "output": "select count(*), t1.network_name, t1.services from station as t1 join route as t2 on t1.id = t2.station_id group by t2.station_id"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "What is the average high temperature for each day of week?", "output": "select avg(high_temperature), day_of_week from weekly_weather group by day_of_week"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. The network_name contains values such as Amersham. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Give me the maximum low temperature and average precipitation at the Amersham station.", "output": "select max(t1.low_temperature), avg(t1.precipitation) from weekly_weather as t1 join station as t2 on t1.station_id = t2.id where t2.network_name = \"Amersham\""}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. The local_authority contains values such as Chiltern. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find names and times of trains that run through stations for the local authority Chiltern.", "output": "select t3.name, t3.time from station as t1 join route as t2 on t1.id = t2.station_id join train as t3 on t2.train_id = t3.id where t1.local_authority = \"Chiltern\""}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "How many different services are provided by all stations?", "output": "select count(distinct services) from station"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find the id and local authority of the station with has the highest average high temperature.", "output": "select t2.id, t2.local_authority from weekly_weather as t1 join station as t2 on t1.station_id = t2.id group by t1.station_id order by avg(high_temperature) desc limit 1"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find the id and local authority of the station whose maximum precipitation is higher than 50.", "output": "select t2.id, t2.local_authority from weekly_weather as t1 join station as t2 on t1.station_id = t2.id group by t1.station_id having max(t1.precipitation) > 50"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "show the lowest low temperature and highest wind speed in miles per hour.", "output": "select min(low_temperature), max(wind_speed_mph) from weekly_weather"}, {"instruction": "station_weather contains tables such as train, station, route, weekly_weather. Table train has columns such as id, train_number, name, origin, destination, time, interval. id is the primary key. Table station has columns such as id, network_name, services, local_authority. id is the primary key. Table route has columns such as train_id, station_id. train_id is the primary key. Table weekly_weather has columns such as station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph. station_id is the primary key. The station_id of route is the foreign key of id of station. The train_id of route is the foreign key of id of train. The station_id of weekly_weather is the foreign key of id of station.", "input": "Find the origins from which more than 1 train starts.", "output": "select origin from train group by origin having count(*) > 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of professors in accounting department.", "output": "select count(*) from professor as t1 join department as t2 on t1.dept_code = t2.dept_code where dept_name = \"Accounting\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors are in the accounting dept?", "output": "select count(*) from professor as t1 join department as t2 on t1.dept_code = t2.dept_code where dept_name = \"Accounting\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors are teaching class with code ACCT-211?", "output": "select count(distinct prof_num) from class where crs_code = \"ACCT-211\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors teach a class with the code ACCT-211?", "output": "select count(distinct prof_num) from class where crs_code = \"ACCT-211\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Biology. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first and last name of the professor in biology department?", "output": "select t3.emp_fname, t3.emp_lname from professor as t1 join department as t2 on t1.dept_code = t2.dept_code join employee as t3 on t1.emp_num = t3.emp_num where dept_name = \"Biology\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Biology. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first and last name of all biology professors?", "output": "select t3.emp_fname, t3.emp_lname from professor as t1 join department as t2 on t1.dept_code = t2.dept_code join employee as t3 on t1.emp_num = t3.emp_num where dept_name = \"Biology\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names and date of birth of professors teaching course ACCT-211?", "output": "select distinct t1.emp_fname, t1.emp_dob from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where crs_code = \"ACCT-211\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names and birthdates of the professors in charge of ACCT-211?", "output": "select distinct t1.emp_fname, t1.emp_dob from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where crs_code = \"ACCT-211\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Graztevski. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many classes are professor whose last name is Graztevski has?", "output": "select count(*) from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where t1.emp_lname = 'Graztevski'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Graztevski. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many classes does the professor whose last name is Graztevski teach?", "output": "select count(*) from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where t1.emp_lname = 'Graztevski'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the code of the school where the accounting department belongs to?", "output": "select school_code from department where dept_name = \"Accounting\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the school code of the accounting department?", "output": "select school_code from department where dept_name = \"Accounting\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as CIS-220. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as CIS-220. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many credits does course CIS-220 have, and what its description?", "output": "select crs_credit, crs_description from course where crs_code = 'CIS-220'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as CIS-220. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as CIS-220. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the description for the CIS-220 and how many credits does it have?", "output": "select crs_credit, crs_description from course where crs_code = 'CIS-220'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "what is the address of history department?", "output": "select dept_address from department where dept_name = 'History'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Where is the history department?", "output": "select dept_address from department where dept_name = 'History'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The school_code contains values such as BUS. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many different locations does the school with code BUS has?", "output": "select count(distinct dept_address) from department where school_code = 'BUS'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The school_code contains values such as BUS. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the different locations of the school with the code BUS?", "output": "select count(distinct dept_address) from department where school_code = 'BUS'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many different locations does each school have?", "output": "select count(distinct dept_address), school_code from department group by school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Count different addresses of each school.", "output": "select count(distinct dept_address), school_code from department group by school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as QM-261. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as QM-261. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the description and credit for the course QM-261?", "output": "select crs_credit, crs_description from course where crs_code = 'QM-261'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as QM-261. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as QM-261. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the course description and number of credits for QM-261?", "output": "select crs_credit, crs_description from course where crs_code = 'QM-261'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of departments in each school.", "output": "select count(distinct dept_name), school_code from department group by school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many departments are in each school?", "output": "select count(distinct dept_name), school_code from department group by school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of different departments in each school whose number of different departments is less than 5.", "output": "select count(distinct dept_name), school_code from department group by school_code having count(distinct dept_name) < 5"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many different departments are there in each school that has less than 5 apartments?", "output": "select count(distinct dept_name), school_code from department group by school_code having count(distinct dept_name) < 5"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many sections does each course has?", "output": "select count(*), crs_code from class group by crs_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many sections does each course have?", "output": "select count(*), crs_code from class group by crs_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the total credit does each department offer?", "output": "select sum(crs_credit), dept_code from course group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many credits does the department offer?", "output": "select sum(crs_credit), dept_code from course group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of classes offered for all class rooms that held at least 2 classes.", "output": "select count(*), class_room from class group by class_room having count(*) >= 2"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "For each classroom with at least 2 classes, how many classes are offered?", "output": "select count(*), class_room from class group by class_room having count(*) >= 2"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of classes in each department.", "output": "select count(*), dept_code from class as t1 join course as t2 on t1.crs_code = t2.crs_code group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many classes are held in each department?", "output": "select count(*), dept_code from class as t1 join course as t2 on t1.crs_code = t2.crs_code group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of classes in each school.", "output": "select count(*), t3.school_code from class as t1 join course as t2 on t1.crs_code = t2.crs_code join department as t3 on t2.dept_code = t3.dept_code group by t3.school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many classes exist for each school?", "output": "select count(*), t3.school_code from class as t1 join course as t2 on t1.crs_code = t2.crs_code join department as t3 on t2.dept_code = t3.dept_code group by t3.school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the number of professors for different school?", "output": "select count(*), t1.school_code from department as t1 join professor as t2 on t1.dept_code = t2.dept_code group by t1.school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many different professors are there for the different schools?", "output": "select count(*), t1.school_code from department as t1 join professor as t2 on t1.dept_code = t2.dept_code group by t1.school_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the count and code of the job has most employees.", "output": "select emp_jobcode, count(*) from employee group by emp_jobcode order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the count and code of the job with the most employee?", "output": "select emp_jobcode, count(*) from employee group by emp_jobcode order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Which school has the smallest amount of professors?", "output": "select t1.school_code from department as t1 join professor as t2 on t1.dept_code = t2.dept_code group by t1.school_code order by count(*) limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Which school has the fewest professors?", "output": "select t1.school_code from department as t1 join professor as t2 on t1.dept_code = t2.dept_code group by t1.school_code order by count(*) limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of professors with a Ph.D. degree in each department.", "output": "select count(*), dept_code from professor where prof_high_degree = 'Ph.d.' group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors have a Ph.D. in each department?", "output": "select count(*), dept_code from professor where prof_high_degree = 'Ph.d.' group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the number of students for each department.", "output": "select count(*), dept_code from student group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many students are in each department?", "output": "select count(*), dept_code from student group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the total number of hours have done for all students in each department.", "output": "select sum(stu_hrs), dept_code from student group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many hours do the students spend studying in each department?", "output": "select sum(stu_hrs), dept_code from student group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the max, average, and minimum gpa of all students in each department.", "output": "select max(stu_gpa), avg(stu_gpa), min(stu_gpa), dept_code from student group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the highest, lowest, and average student GPA for every department?", "output": "select max(stu_gpa), avg(stu_gpa), min(stu_gpa), dept_code from student group by dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name and the average gpa of department whose students have the highest average gpa?", "output": "select t2.dept_name, avg(t1.stu_gpa) from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by avg(t1.stu_gpa) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Which department has the highest average student GPA, and what is the average gpa?", "output": "select t2.dept_name, avg(t1.stu_gpa) from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by avg(t1.stu_gpa) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "how many schools exist in total?", "output": "select count(distinct school_code) from department"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many schools are there in the department?", "output": "select count(distinct school_code) from department"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many different classes are there?", "output": "select count(distinct class_code) from class"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many unique classes are offered?", "output": "select count(distinct class_code) from class"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many courses are offered?", "output": "select count(distinct crs_code) from class"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the number of different course codes?", "output": "select count(distinct crs_code) from class"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many departments does the college has?", "output": "select count(distinct dept_name) from department"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many different departments are there?", "output": "select count(distinct dept_name) from department"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Computer Info. Systems. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many courses are offered by the Computer Info. Systems department?", "output": "select count(*) from department as t1 join course as t2 on t1.dept_code = t2.dept_code where dept_name = \"Computer info. Systems\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many courses does the department of Computer Information Systmes offer?", "output": "select count(*) from department as t1 join course as t2 on t1.dept_code = t2.dept_code where dept_name = \"Computer info. Systems\""}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many sections does course ACCT-211 has?", "output": "select count(distinct class_section) from class where crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the number of different class sections offered in the course ACCT-211?", "output": "select count(distinct class_section) from class where crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the total credits of all classes offered by each department.", "output": "select sum(t1.crs_credit), t1.dept_code from course as t1 join class as t2 on t1.crs_code = t2.crs_code group by t1.dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the total number of credits offered by each department?", "output": "select sum(t1.crs_credit), t1.dept_code from course as t1 join class as t2 on t1.crs_code = t2.crs_code group by t1.dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the name of the department that offers the largest number of credits of all classes.", "output": "select t3.dept_name from course as t1 join class as t2 on t1.crs_code = t2.crs_code join department as t3 on t1.dept_code = t3.dept_code group by t1.dept_code order by sum(t1.crs_credit) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Which department offers the most credits all together?", "output": "select t3.dept_name from course as t1 join class as t2 on t1.crs_code = t2.crs_code join department as t3 on t1.dept_code = t3.dept_code group by t1.dept_code order by sum(t1.crs_credit) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many students enrolled in class ACCT-211?", "output": "select count(*) from class as t1 join enroll as t2 on t1.class_code = t2.class_code where t1.crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the total number of students enrolled in ACCT-211?", "output": "select count(*) from class as t1 join enroll as t2 on t1.class_code = t2.class_code where t1.crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name of each student enrolled in class ACCT-211?", "output": "select t3.stu_fname from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t2.stu_num = t3.stu_num where t1.crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all students in course ACCT-211?", "output": "select t3.stu_fname from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t2.stu_num = t3.stu_num where t1.crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name of students enrolled in class ACCT-211 and got grade C?", "output": "select t3.stu_fname from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t2.stu_num = t3.stu_num where t1.crs_code = 'ACCT-211' and t2.enroll_grade = 'C'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all students who took ACCT-211 and received a C?", "output": "select t3.stu_fname from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t2.stu_num = t3.stu_num where t1.crs_code = 'ACCT-211' and t2.enroll_grade = 'C'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the total number of employees.", "output": "select count(*) from employee"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many employees are there all together?", "output": "select count(*) from employee"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors do have a Ph.D. degree?", "output": "select count(*) from professor where prof_high_degree = 'Ph.d.'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the total number of professors with a Ph.D. ?", "output": "select count(*) from professor where prof_high_degree = 'Ph.d.'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many students are enrolled in the class taught by some professor from the accounting department?", "output": "select count(*) from class as t1 join enroll as t2 on t1.class_code = t2.class_code join course as t3 on t1.crs_code = t3.crs_code join department as t4 on t3.dept_code = t4.dept_code where t4.dept_name = 'Accounting'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many students are enrolled in some classes that are taught by an accounting professor?", "output": "select count(*) from class as t1 join enroll as t2 on t1.class_code = t2.class_code join course as t3 on t1.crs_code = t3.crs_code join department as t4 on t3.dept_code = t4.dept_code where t4.dept_name = 'Accounting'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of the department that has the largest number of students enrolled?", "output": "select t4.dept_name from class as t1 join enroll as t2 on t1.class_code = t2.class_code join course as t3 on t1.crs_code = t3.crs_code join department as t4 on t3.dept_code = t4.dept_code group by t3.dept_code order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of the department with the most students enrolled?", "output": "select t4.dept_name from class as t1 join enroll as t2 on t1.class_code = t2.class_code join course as t3 on t1.crs_code = t3.crs_code join department as t4 on t3.dept_code = t4.dept_code group by t3.dept_code order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "list names of all departments ordered by their names.", "output": "select dept_name from department order by dept_name"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the names of all departments in alphabetical order?", "output": "select dept_name from department order by dept_name"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The class_room contains values such as KLR209. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "List the codes of all courses that take place in room KLR209.", "output": "select class_code from class where class_room = 'KLR209'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The class_room contains values such as KLR209. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the codes of all the courses that are located in room KLR209?", "output": "select class_code from class where class_room = 'KLR209'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_jobcode contains values such as PROF. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "List the first name of all employees with job code PROF ordered by their date of birth.", "output": "select emp_fname from employee where emp_jobcode = 'PROF' order by emp_dob"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all employees that are professors ordered by date of birth?", "output": "select emp_fname from employee where emp_jobcode = 'PROF' order by emp_dob"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names and offices of all professors sorted by alphabetical order of their first name.", "output": "select t2.emp_fname, t1.prof_office from professor as t1 join employee as t2 on t1.emp_num = t2.emp_num order by t2.emp_fname"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names and office locations for all professors sorted alphabetically by first name?", "output": "select t2.emp_fname, t1.prof_office from professor as t1 join employee as t2 on t1.emp_num = t2.emp_num order by t2.emp_fname"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first and last name of the oldest employee?", "output": "select emp_fname, emp_lname from employee order by emp_dob limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first and last names of the employee with the earliest date of birth?", "output": "select emp_fname, emp_lname from employee order by emp_dob limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first, last name, gpa of the youngest one among students whose GPA is above 3?", "output": "select stu_fname, stu_lname, stu_gpa from student where stu_gpa > 3 order by stu_dob desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?", "output": "select stu_fname, stu_lname, stu_gpa from student where stu_gpa > 3 order by stu_dob desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name of students who got grade C in any class?", "output": "select distinct stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where enroll_grade = 'C'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all students who got a grade C in a class?", "output": "select distinct stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where enroll_grade = 'C'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of department where has the smallest number of professors?", "output": "select t2.dept_name from professor as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count(*) limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of the department with the fewest professors?", "output": "select t2.dept_name from professor as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count(*) limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of department where has the largest number of professors with a Ph.D. degree?", "output": "select t2.dept_name, t1.dept_code from professor as t1 join department as t2 on t1.dept_code = t2.dept_code where t1.prof_high_degree = 'Ph.d.' group by t1.dept_code order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Which department has the most professors with a Ph.D.?", "output": "select t2.dept_name, t1.dept_code from professor as t1 join department as t2 on t1.dept_code = t2.dept_code where t1.prof_high_degree = 'Ph.d.' group by t1.dept_code order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of the professors who do not teach a class.", "output": "select emp_fname from employee where emp_jobcode = 'PROF' except select t1.emp_fname from employee as t1 join class as t2 on t1.emp_num = t2.prof_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all professors not teaching any classes?", "output": "select emp_fname from employee where emp_jobcode = 'PROF' except select t1.emp_fname from employee as t1 join class as t2 on t1.emp_num = t2.prof_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first names of the professors from the history department who do not teach a class.", "output": "select t1.emp_fname from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t2.dept_code = t3.dept_code where t3.dept_name = 'History' except select t4.emp_fname from employee as t4 join class as t5 on t4.emp_num = t5.prof_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all history professors who do not teach?", "output": "select t1.emp_fname from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t2.dept_code = t3.dept_code where t3.dept_name = 'History' except select t4.emp_fname from employee as t4 join class as t5 on t4.emp_num = t5.prof_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the last name and office of the professor from the history department?", "output": "select t1.emp_lname, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t2.dept_code = t3.dept_code where t3.dept_name = 'History'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the last name and office of all history professors?", "output": "select t1.emp_lname, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t2.dept_code = t3.dept_code where t3.dept_name = 'History'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Heffington. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is department name and office for the professor whose last name is Heffington?", "output": "select t3.dept_name, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t2.dept_code = t3.dept_code where t1.emp_lname = 'Heffington'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Heffington. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of the department and office location for the professor with the last name of Heffington?", "output": "select t3.dept_name, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t2.dept_code = t3.dept_code where t1.emp_lname = 'Heffington'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_office contains values such as DRE 102. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the last name and hire date of the professor who is in office DRE 102.", "output": "select t1.emp_lname, t1.emp_hiredate from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num where t2.prof_office = 'DRE 102'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_office contains values such as DRE 102. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the last name of the professor whose office is located in DRE 102, and when were they hired?", "output": "select t1.emp_lname, t1.emp_hiredate from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num where t2.prof_office = 'DRE 102'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Smithson. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The stu_lname contains values such as Smithson. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the code of the course which the student whose last name is Smithson took?", "output": "select t1.crs_code from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t3.stu_num = t2.stu_num where t3.stu_lname = 'Smithson'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Smithson. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The stu_lname contains values such as Smithson. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the course codes for every class that the student with the last name Smithson took?", "output": "select t1.crs_code from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t3.stu_num = t2.stu_num where t3.stu_lname = 'Smithson'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Smithson. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The stu_lname contains values such as Smithson. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the description and credit of the course which the student whose last name is Smithson took?", "output": "select t4.crs_description, t4.crs_credit from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t3.stu_num = t2.stu_num join course as t4 on t4.crs_code = t1.crs_code where t3.stu_lname = 'Smithson'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. The emp_lname contains values such as Smithson. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The stu_lname contains values such as Smithson. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many credits is the course that the student with the last name Smithson took, and what is its description?", "output": "select t4.crs_description, t4.crs_credit from class as t1 join enroll as t2 on t1.class_code = t2.class_code join student as t3 on t3.stu_num = t2.stu_num join course as t4 on t4.crs_code = t1.crs_code where t3.stu_lname = 'Smithson'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors who has a either Ph.D. or MA degree?", "output": "select count(*) from professor where prof_high_degree = 'Ph.d.' or prof_high_degree = 'MA'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors attained either Ph.D. or Masters degrees?", "output": "select count(*) from professor where prof_high_degree = 'Ph.d.' or prof_high_degree = 'MA'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting, Biology. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "How many professors who are from either Accounting or Biology department?", "output": "select count(*) from professor as t1 join department as t2 on t1.dept_code = t2.dept_code where t2.dept_name = 'Accounting' or t2.dept_name = 'Biology'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting, Biology. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the number of professors who are in the Accounting or Biology departments?", "output": "select count(*) from professor as t1 join department as t2 on t1.dept_code = t2.dept_code where t2.dept_name = 'Accounting' or t2.dept_name = 'Biology'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as CIS-220, QM-261. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as CIS-220, QM-261. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.", "output": "select t1.emp_fname from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where crs_code = 'CIS-220' intersect select t1.emp_fname from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where crs_code = 'QM-261'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as CIS-220, QM-261. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as CIS-220, QM-261. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name of the professor who is teaching CIS-220 and QM-261?", "output": "select t1.emp_fname from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where crs_code = 'CIS-220' intersect select t1.emp_fname from employee as t1 join class as t2 on t1.emp_num = t2.prof_num where crs_code = 'QM-261'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Computer Info. Systems, Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first name of student who is taking classes from accounting and Computer Info. Systems departments", "output": "select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code join department as t5 on t5.dept_code = t4.dept_code where t5.dept_name = 'Accounting' intersect select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code join department as t5 on t5.dept_code = t4.dept_code where t5.dept_name = 'Computer info. Systems'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all students taking accoutning and Computer Information Systems classes?", "output": "select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code join department as t5 on t5.dept_code = t4.dept_code where t5.dept_name = 'Accounting' intersect select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code join department as t5 on t5.dept_code = t4.dept_code where t5.dept_name = 'Computer info. Systems'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the average gpa of the students enrolled in the course with code ACCT-211?", "output": "select avg(t2.stu_gpa) from enroll as t1 join student as t2 on t1.stu_num = t2.stu_num join class as t3 on t1.class_code = t3.class_code where t3.crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the average GPA of students taking ACCT-211?", "output": "select avg(t2.stu_gpa) from enroll as t1 join student as t2 on t1.stu_num = t2.stu_num join class as t3 on t1.class_code = t3.class_code where t3.crs_code = 'ACCT-211'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name, gpa and phone number of the top 5 students with highest gpa?", "output": "select stu_gpa, stu_phone, stu_fname from student order by stu_gpa desc limit 5"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name, GPA, and phone number of the students with the top 5 GPAs?", "output": "select stu_gpa, stu_phone, stu_fname from student order by stu_gpa desc limit 5"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the department name of the students with lowest gpa belongs to?", "output": "select t2.dept_name from student as t1 join department as t2 on t1.dept_code = t2.dept_code order by stu_gpa limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of the department with the student that has the lowest GPA?", "output": "select t2.dept_name from student as t1 join department as t2 on t1.dept_code = t2.dept_code order by stu_gpa limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.", "output": "select stu_fname, stu_gpa from student where stu_gpa < (select avg(stu_gpa) from student)"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name and GPA of every student that has a GPA lower than average?", "output": "select stu_fname, stu_gpa from student where stu_gpa < (select avg(stu_gpa) from student)"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the name and address of the department that has the highest number of students.", "output": "select t2.dept_name, t2.dept_address from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name and address of the department with the most students?", "output": "select t2.dept_name, t2.dept_address from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count(*) desc limit 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the name, address, number of students in the departments that have the top 3 highest number of students.", "output": "select t2.dept_name, t2.dept_address, count(*) from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count(*) desc limit 3"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name, address, and number of students in the departments that have the 3 most students?", "output": "select t2.dept_name, t2.dept_address, count(*) from student as t1 join department as t2 on t1.dept_code = t2.dept_code group by t1.dept_code order by count(*) desc limit 3"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first name and office of the professor who is in the history department and has a Ph.D. degree.", "output": "select t1.emp_fname, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t3.dept_code = t2.dept_code where t3.dept_name = 'History' and t2.prof_high_degree = 'Ph.d.'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names and office of the professors who are in the history department and have a Ph.D?", "output": "select t1.emp_fname, t2.prof_office from employee as t1 join professor as t2 on t1.emp_num = t2.emp_num join department as t3 on t3.dept_code = t2.dept_code where t3.dept_name = 'History' and t2.prof_high_degree = 'Ph.d.'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names of all instructors who have taught some course and the course code.", "output": "select t2.emp_fname, t1.crs_code from class as t1 join employee as t2 on t1.prof_num = t2.emp_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all teachers who have taught a course and the corresponding course codes?", "output": "select t2.emp_fname, t1.crs_code from class as t1 join employee as t2 on t1.prof_num = t2.emp_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names of all instructors who have taught some course and the course description.", "output": "select t2.emp_fname, t3.crs_description from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join course as t3 on t1.crs_code = t3.crs_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all teachers who have taught a course and the corresponding descriptions?", "output": "select t2.emp_fname, t3.crs_description from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join course as t3 on t1.crs_code = t3.crs_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names and offices of all instructors who have taught some course and also find the course description.", "output": "select t2.emp_fname, t4.prof_office, t3.crs_description from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join course as t3 on t1.crs_code = t3.crs_code join professor as t4 on t2.emp_num = t4.emp_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names, office locations of all lecturers who have taught some course?", "output": "select t2.emp_fname, t4.prof_office, t3.crs_description from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join course as t3 on t1.crs_code = t3.crs_code join professor as t4 on t2.emp_num = t4.emp_num"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names and offices of all instructors who have taught some course and the course description and the department name.", "output": "select t2.emp_fname, t4.prof_office, t3.crs_description, t5.dept_name from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join course as t3 on t1.crs_code = t3.crs_code join professor as t4 on t2.emp_num = t4.emp_num join department as t5 on t4.dept_code = t5.dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?", "output": "select t2.emp_fname, t4.prof_office, t3.crs_description, t5.dept_name from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join course as t3 on t1.crs_code = t3.crs_code join professor as t4 on t2.emp_num = t4.emp_num join department as t5 on t4.dept_code = t5.dept_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find names of all students who took some course and the course description.", "output": "select t1.stu_fname, t1.stu_lname, t4.crs_description from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the names of all students who took a class and the corresponding course descriptions?", "output": "select t1.stu_fname, t1.stu_lname, t4.crs_description from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code join course as t4 on t3.crs_code = t4.crs_code"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find names of all students who took some course and got A or C.", "output": "select t1.stu_fname, t1.stu_lname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where t2.enroll_grade = 'C' or t2.enroll_grade = 'A'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the names of all students taking a course who received an A or C?", "output": "select t1.stu_fname, t1.stu_lname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where t2.enroll_grade = 'C' or t2.enroll_grade = 'A'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names of all professors in the Accounting department who is teaching some course and the class room.", "output": "select t2.emp_fname, t1.class_room from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code where t4.dept_name = 'Accounting'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_description contains values such as Accounting II. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Accounting. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?", "output": "select t2.emp_fname, t1.class_room from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code where t4.dept_name = 'Accounting'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as Computer Info. Systems. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names and degree of all professors who are teaching some class in Computer Info. Systems department.", "output": "select distinct t2.emp_fname, t3.prof_high_degree from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code where t4.dept_name = 'Computer info. Systems'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?", "output": "select distinct t2.emp_fname, t3.prof_high_degree from class as t1 join employee as t2 on t1.prof_num = t2.emp_num join professor as t3 on t2.emp_num = t3.emp_num join department as t4 on t4.dept_code = t3.dept_code where t4.dept_name = 'Computer info. Systems'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the last name of the student who got a grade A in the class with code 10018.", "output": "select t1.stu_lname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where t2.enroll_grade = 'A' and t2.class_code = 10018"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the last name of the student who received an A in the class with the code 10018?", "output": "select t1.stu_lname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num where t2.enroll_grade = 'A' and t2.class_code = 10018"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first name and office of history professor who did not get a Ph.D. degree.", "output": "select t2.emp_fname, t1.prof_office from professor as t1 join employee as t2 on t1.emp_num = t2.emp_num join department as t3 on t1.dept_code = t3.dept_code where t3.dept_name = 'History' and t1.prof_high_degree != 'Ph.d.'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. The dept_name contains values such as History. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. The prof_high_degree contains values such as Ph.D.. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names and offices of history professors who don't have Ph.D.s?", "output": "select t2.emp_fname, t1.prof_office from professor as t1 join employee as t2 on t1.emp_num = t2.emp_num join department as t3 on t1.dept_code = t3.dept_code where t3.dept_name = 'History' and t1.prof_high_degree != 'Ph.d.'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names of professors who are teaching more than one class.", "output": "select t2.emp_fname from class as t1 join employee as t2 on t1.prof_num = t2.emp_num group by t1.prof_num having count(*) > 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of all professors who teach more than one class?", "output": "select t2.emp_fname from class as t1 join employee as t2 on t1.prof_num = t2.emp_num group by t1.prof_num having count(*) > 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the first names of students who took exactly one class.", "output": "select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num group by t2.stu_num having count(*) = 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What are the first names of student who only took one course?", "output": "select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num group by t2.stu_num having count(*) = 1"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "Find the name of department that offers the class whose description has the word \"Statistics\".", "output": "select t2.dept_name from course as t1 join department as t2 on t1.dept_code = t2.dept_code where t1.crs_description like '%statistics%'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the name of the department that offers a course that has a description including the word \"Statistics\"?", "output": "select t2.dept_name from course as t1 join department as t2 on t1.dept_code = t2.dept_code where t1.crs_description like '%statistics%'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name of the student whose last name starting with the letter S and is taking ACCT-211 class?", "output": "select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code where t3.crs_code = 'ACCT-211' and t1.stu_lname like 'S%'"}, {"instruction": "college_1 contains tables such as class, course, department, employee, enroll, professor, student. Table class has columns such as class_code, crs_code, class_section, class_time, class_room, prof_num. class_code is the primary key. The crs_code contains values such as ACCT-211. Table course has columns such as crs_code, dept_code, crs_description, crs_credit. crs_code is the primary key. The crs_code contains values such as ACCT-211. Table department has columns such as dept_code, dept_name, school_code, emp_num, dept_address, dept_extension. dept_code is the primary key. Table employee has columns such as emp_num, emp_lname, emp_fname, emp_initial, emp_jobcode, emp_hiredate, emp_dob. emp_num is the primary key. Table enroll has columns such as class_code, stu_num, enroll_grade. is the primary key. Table professor has columns such as emp_num, dept_code, prof_office, prof_extension, prof_high_degree. is the primary key. Table student has columns such as stu_num, stu_lname, stu_fname, stu_init, stu_dob, stu_hrs, stu_class, stu_gpa, stu_transfer, dept_code, stu_phone, prof_num. stu_num is the primary key. The prof_num of class is the foreign key of emp_num of employee. The crs_code of class is the foreign key of crs_code of course. The dept_code of course is the foreign key of dept_code of department. The emp_num of department is the foreign key of emp_num of employee. The stu_num of enroll is the foreign key of stu_num of student. The class_code of enroll is the foreign key of class_code of class. The dept_code of professor is the foreign key of dept_code of department. The emp_num of professor is the foreign key of emp_num of employee. The dept_code of student is the foreign key of dept_code of department.", "input": "What is the first name of the student whose last name starts with the letter S and is taking ACCT-211?", "output": "select t1.stu_fname from student as t1 join enroll as t2 on t1.stu_num = t2.stu_num join class as t3 on t2.class_code = t3.class_code where t3.crs_code = 'ACCT-211' and t1.stu_lname like 'S%'"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "How many clubs are there?", "output": "select count(*) from club"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the total number of clubs?", "output": "select count(*) from club"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List the distinct region of clubs in ascending alphabetical order.", "output": "select distinct region from club order by region asc"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the different regions of clubs in ascending alphabetical order?", "output": "select distinct region from club order by region asc"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the average number of gold medals for clubs?", "output": "select avg(gold) from club_rank"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the average number of gold medals for a club?", "output": "select avg(gold) from club_rank"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the types and countries of competitions?", "output": "select competition_type, country from competition"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the types of every competition and in which countries are they located?", "output": "select competition_type, country from competition"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. The competition_type contains values such as Tournament. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the distinct years in which the competitions type is not \"Tournament\"?", "output": "select distinct year from competition where competition_type != \"Tournament\""}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. The competition_type contains values such as Tournament. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the different years for all competitions that are not of type equal to tournament?", "output": "select distinct year from competition where competition_type != \"Tournament\""}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the maximum and minimum number of silver medals for clubs.", "output": "select max(silver), min(silver) from club_rank"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the maximum and minimum number of silver medals for all the clubs?", "output": "select max(silver), min(silver) from club_rank"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "How many clubs have total medals less than 10?", "output": "select count(*) from club_rank where total < 10"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the total number of clubs that have less than 10 medals in total?", "output": "select count(*) from club_rank where total < 10"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List all club names in ascending order of start year.", "output": "select name from club order by start_year asc"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the names of all the clubs starting with the oldest?", "output": "select name from club order by start_year asc"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List all club names in descending alphabetical order.", "output": "select name from club order by name desc"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the names of all the clubs ordered in descending alphabetical order?", "output": "select name from club order by name desc"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "Please show the names and the players of clubs.", "output": "select t1.name, t2.player_id from club as t1 join player as t2 on t1.club_id = t2.club_id"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the names and players of all the clubs?", "output": "select t1.name, t2.player_id from club as t1 join player as t2 on t1.club_id = t2.club_id"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. The position contains values such as Right Wing. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "Show the names of clubs that have players with position \"Right Wing\".", "output": "select t1.name from club as t1 join player as t2 on t1.club_id = t2.club_id where t2.position = \"Right Wing\""}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. The position contains values such as Right Wing. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the names of the clubs that have players in the position of \"Right Wing\"?", "output": "select t1.name from club as t1 join player as t2 on t1.club_id = t2.club_id where t2.position = \"Right Wing\""}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. The name contains values such as AIB. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the average points of players from club with name \"AIB\".", "output": "select avg(t2.points) from club as t1 join player as t2 on t1.club_id = t2.club_id where t1.name = \"AIB\""}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. The name contains values such as AIB. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the average number of points for players from the \"AIB\" club?", "output": "select avg(t2.points) from club as t1 join player as t2 on t1.club_id = t2.club_id where t1.name = \"AIB\""}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List the position of players and the average number of points of players of each position.", "output": "select position, avg(points) from player group by position"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "For each position, what is the average number of points for players in that position?", "output": "select position, avg(points) from player group by position"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List the position of players with average number of points scored by players of that position bigger than 20.", "output": "select position from player group by name having avg(points) >= 20"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the positions of players whose average number of points scored by that position is larger than 20?", "output": "select position from player group by name having avg(points) >= 20"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List the types of competition and the number of competitions of each type.", "output": "select competition_type, count(*) from competition group by competition_type"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the types of competition and number of competitions for that type?", "output": "select competition_type, count(*) from competition group by competition_type"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List the most common type of competition.", "output": "select competition_type from competition group by competition_type order by count(*) desc limit 1"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the most common competition type?", "output": "select competition_type from competition group by competition_type order by count(*) desc limit 1"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List the types of competition that have at most five competitions of that type.", "output": "select competition_type from competition group by competition_type having count(*) <= 5"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the types of competition that have most 5 competitions for that type?", "output": "select competition_type from competition group by competition_type having count(*) <= 5"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "List the names of clubs that do not have any players.", "output": "select name from club where club_id not in (select club_id from player)"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the names of all clubs that do not have any players?", "output": "select name from club where club_id not in (select club_id from player)"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the positions with both players having more than 20 points and less than 10 points.", "output": "select position from player where points > 20 intersect select position from player where points < 10"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the positions of both players that have more than 20 20 points and less than 10 points?", "output": "select position from player where points > 20 intersect select position from player where points < 10"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "Show total points of all players.", "output": "select sum(points) from player"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the total number of points for all players?", "output": "select sum(points) from player"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "how many different positions are there?", "output": "select count(distinct position) from player"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "How many different position for players are listed?", "output": "select count(distinct position) from player"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "what are the name of players who get more than the average points.", "output": "select name from player where points > (select avg(points) from player)"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the names of all players that got more than the average number of points?", "output": "select name from player where points > (select avg(points) from player)"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "find the number of players whose points are lower than 30 in each position.", "output": "select count(*), position from player where points < 30 group by position"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What is the number of players who have points less than 30 for each position?", "output": "select count(*), position from player where points < 30 group by position"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. The competition_type contains values such as Tournament. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "which country did participated in the most number of Tournament competitions?", "output": "select country from competition where competition_type = 'Tournament' group by country order by count(*) desc limit 1"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. The competition_type contains values such as Tournament. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "what is the name of the country that participated in the most tournament competitions?", "output": "select country from competition where competition_type = 'Tournament' group by country order by count(*) desc limit 1"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. The competition_type contains values such as Tournament, Friendly. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "which countries did participated in both Friendly and Tournament type competitions.", "output": "select country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. The competition_type contains values such as Tournament, Friendly. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the countries that participated in both friendly and tournament type competitions?", "output": "select country from competition where competition_type = 'Friendly' intersect select country from competition where competition_type = 'Tournament'"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. The competition_type contains values such as Friendly. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "Find the countries that have never participated in any competition with Friendly type.", "output": "select country from competition except select country from competition where competition_type = 'Friendly'"}, {"instruction": "sports_competition contains tables such as club, club_rank, player, competition, competition_result. Table club has columns such as club_id, name, region, start_year. club_id is the primary key. Table club_rank has columns such as rank, club_id, gold, silver, bronze, total. rank is the primary key. Table player has columns such as player_id, name, position, club_id, apps, tries, goals, points. player_id is the primary key. Table competition has columns such as competition_id, year, competition_type, country. competition_id is the primary key. Table competition_result has columns such as competition_id, club_id_1, club_id_2, score. competition_id is the primary key. The club_id of club_rank is the foreign key of club_id of club. The club_id of player is the foreign key of club_id of club. The competition_id of competition_result is the foreign key of competition_id of competition. The club_id_2 of competition_result is the foreign key of club_id of club. The club_id_1 of competition_result is the foreign key of club_id of club.", "input": "What are the countries that have never participated in any friendly-type competitions?", "output": "select country from competition except select country from competition where competition_type = 'Friendly'"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "How many furniture components are there in total?", "output": "select sum(num_of_component) from furniture"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Return the name and id of the furniture with the highest market rate.", "output": "select name, furniture_id from furniture order by market_rate desc limit 1"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "find the total market rate of the furnitures that have the top 2 market shares.", "output": "select sum(market_rate) from furniture order by market_rate desc limit 2"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the component amounts and names of all furnitures that have more than 10 components.", "output": "select num_of_component, name from furniture where num_of_component > 10"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the name and component amount of the least popular furniture.", "output": "select name, num_of_component from furniture order by market_rate limit 1"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the names of furnitures whose prices are lower than the highest price.", "output": "select t1.name from furniture as t1 join furniture_manufacte as t2 on t1.furniture_id = t2.furniture_id where t2.price_in_dollar < (select max(price_in_dollar) from furniture_manufacte)"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Which manufacturer has the most number of shops? List its name and year of opening.", "output": "select open_year, name from manufacturer order by num_of_shops desc limit 1"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the average number of factories for the manufacturers that have more than 20 shops.", "output": "select avg(num_of_factories) from manufacturer where num_of_shops > 20"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "List all manufacturer names and ids ordered by their opening year.", "output": "select name, manufacturer_id from manufacturer order by open_year"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Give me the name and year of opening of the manufacturers that have either less than 10 factories or more than 10 shops.", "output": "select name, open_year from manufacturer where num_of_shops > 10 or num_of_factories < 10"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.", "output": "select max(num_of_shops), avg(num_of_factories) from manufacturer where open_year < 1990"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the id and number of shops for the company that produces the most expensive furniture.", "output": "select t1.manufacturer_id, t1.num_of_shops from manufacturer as t1 join furniture_manufacte as t2 on t1.manufacturer_id = t2.manufacturer_id order by t2.price_in_dollar desc limit 1"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the number of funiture types produced by each manufacturer as well as the company names.", "output": "select count(*), t1.name from manufacturer as t1 join furniture_manufacte as t2 on t1.manufacturer_id = t2.manufacturer_id group by t1.manufacturer_id"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Give me the names and prices of furnitures which some companies are manufacturing.", "output": "select t1.name, t2.price_in_dollar from furniture as t1 join furniture_manufacte as t2 on t1.furniture_id = t2.furniture_id"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the market shares and names of furnitures which no any company is producing in our records.", "output": "select market_rate, name from furniture where furniture_id not in (select furniture_id from furniture_manufacte)"}, {"instruction": "manufacturer contains tables such as manufacturer, furniture, furniture_manufacte. Table manufacturer has columns such as manufacturer_id, open_year, name, num_of_factories, num_of_shops. manufacturer_id is the primary key. Table furniture has columns such as furniture_id, name, num_of_component, market_rate. furniture_id is the primary key. Table furniture_manufacte has columns such as manufacturer_id, furniture_id, price_in_dollar. manufacturer_id is the primary key. The furniture_id of furniture_manufacte is the foreign key of furniture_id of furniture. The manufacturer_id of furniture_manufacte is the foreign key of manufacturer_id of manufacturer.", "input": "Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.", "output": "select t3.name from furniture as t1 join furniture_manufacte as t2 on t1.furniture_id = t2.furniture_id join manufacturer as t3 on t2.manufacturer_id = t3.manufacturer_id where t1.num_of_component < 6 intersect select t3.name from furniture as t1 join furniture_manufacte as t2 on t1.furniture_id = t2.furniture_id join manufacturer as t3 on t2.manufacturer_id = t3.manufacturer_id where t1.num_of_component > 10"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Display the first name and department name for each employee.", "output": "select t1.first_name, t2.department_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the first name and department name of all employees?", "output": "select t1.first_name, t2.department_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "List the full name (first and last name), and salary for those employees who earn below 6000.", "output": "select first_name, last_name, salary from employees where salary < 6000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full names and salaries for any employees earning less than 6000?", "output": "select first_name, last_name, salary from employees where salary < 6000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The last_name contains values such as McEwen. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Display the first name, and department number for all employees whose last name is \"McEwen\".", "output": "select first_name, department_id from employees where last_name = 'McEwen'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The last_name contains values such as McEwen. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the first names and department numbers for employees with last name McEwen?", "output": "select first_name, department_id from employees where last_name = 'McEwen'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Return all the information for all employees without any department number.", "output": "select * from employees where department_id = \"null\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are all the employees without a department number?", "output": "select * from employees where department_id = \"null\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. The department_name contains values such as Marketing. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Display all the information about the department Marketing.", "output": "select * from departments where department_name = 'Marketing'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. The department_name contains values such as Marketing. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the information about the Marketing department?", "output": "select * from departments where department_name = 'Marketing'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "when is the hire date for those employees whose first name does not containing the letter M?", "output": "select hire_date from employees where first_name not like '%m%'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "On what dates were employees without the letter M in their first names hired?", "output": "select hire_date from employees where first_name not like '%m%'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.", "output": "select first_name, last_name, hire_date, salary, department_id from employees where first_name not like '%m%'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full name, hire date, salary, and department id for employees without the letter M in their first name?", "output": "select first_name, last_name, hire_date, salary, department_id from employees where first_name not like '%m%'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number.", "output": "select first_name, last_name, hire_date, salary, department_id from employees where first_name not like '%m%' order by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id?", "output": "select first_name, last_name, hire_date, salary, department_id from employees where first_name not like '%m%' order by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "what is the phone number of employees whose salary is in the range of 8000 and 12000?", "output": "select phone_number from employees where salary between 8000 and 12000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Return the phone numbers of employees with salaries between 8000 and 12000.", "output": "select phone_number from employees where salary between 8000 and 12000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.", "output": "select * from employees where salary between 8000 and 12000 and commission_pct != \"null\" or department_id != 40"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Return all information about employees with salaries between 8000 and 12000 for which commission is not null or where their department id is not 40.", "output": "select * from employees where salary between 8000 and 12000 and commission_pct != \"null\" or department_id != 40"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full name (first and last name) and salary for all employees who does not have any value for commission?", "output": "select first_name, last_name, salary from employees where commission_pct = \"null\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Return the full names and salaries of employees with null commissions.", "output": "select first_name, last_name, salary from employees where commission_pct = \"null\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Display the first and last name, and salary for those employees whose first name is ending with the letter m.", "output": "select first_name, last_name, salary from employees where first_name like '%m'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Return the full names and salaries for employees with first names that end with the letter m.", "output": "select first_name, last_name, salary from employees where first_name like '%m'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.", "output": "select job_id, hire_date from employees where hire_date between '2007-11-05' and '2009-07-05'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?", "output": "select job_id, hire_date from employees where hire_date between '2007-11-05' and '2009-07-05'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the first and last name for those employees who works either in department 70 or 90?", "output": "select first_name, last_name from employees where department_id = 70 or department_id = 90"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full names of employees who with in department 70 or 90?", "output": "select first_name, last_name from employees where department_id = 70 or department_id = 90"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find the salary and manager number for those employees who is working under a manager.", "output": "select salary, manager_id from employees where manager_id != \"null\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the salaries and manager ids for employees who have managers?", "output": "select salary, manager_id from employees where manager_id != \"null\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display all the details from Employees table for those employees who was hired before 2002-06-21.", "output": "select * from employees where hire_date < '2002-06-21'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the information about employees hired before June 21, 2002?", "output": "select * from employees where hire_date < '2002-06-21'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display all the information for all employees who have the letters D or S in their first name and also arrange the result in descending order by salary.", "output": "select * from employees where first_name like '%d%' or first_name like '%s%' order by salary desc"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the information about employees with D or S in their first name, ordered by salary descending?", "output": "select * from employees where first_name like '%d%' or first_name like '%s%' order by salary desc"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display those employees who joined after 7th September, 1987.", "output": "select * from employees where hire_date > '1987-09-07'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Which employees were hired after September 7th, 1987?", "output": "select * from employees where hire_date > '1987-09-07'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the job title of jobs which minimum salary is greater than 9000.", "output": "select job_title from jobs where min_salary > 9000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Which job titles correspond to jobs with salaries over 9000?", "output": "select job_title from jobs where min_salary > 9000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.", "output": "select job_title, max_salary - min_salary from jobs where max_salary between 12000 and 18000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?", "output": "select job_title, max_salary - min_salary from jobs where max_salary between 12000 and 18000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.", "output": "select email from employees where commission_pct = \"null\" and salary between 7000 and 12000 and department_id = 50"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the emails of employees with null commission, salary between 7000 and 12000, and who work in department 50?", "output": "select email from employees where commission_pct = \"null\" and salary between 7000 and 12000 and department_id = 50"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee ID for each employee and the date on which he ended his previous job.", "output": "select employee_id, max(end_date) from job_history group by employee_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the employee ids for each employee and final dates of employment at their last job?", "output": "select employee_id, max(end_date) from job_history group by employee_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display those departments where more than ten employees work who got a commission percentage.", "output": "select department_id from employees group by department_id having count(commission_pct) > 10"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the department ids for which more than 10 employees had a commission?", "output": "select department_id from employees group by department_id having count(commission_pct) > 10"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find the ids of the departments where any manager is managing 4 or more employees.", "output": "select distinct department_id from employees group by department_id, manager_id having count(employee_id) >= 4"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are department ids for departments with managers managing more than 3 employees?", "output": "select distinct department_id from employees group by department_id, manager_id having count(employee_id) >= 4"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the average salary of employees for each department who gets a commission percentage.", "output": "select department_id, avg(salary) from employees where commission_pct != \"null\" group by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is the average salary of employees who have a commission percentage that is not null?", "output": "select department_id, avg(salary) from employees where commission_pct != \"null\" group by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the country ID and number of cities for each country.", "output": "select country_id, count(*) from locations group by country_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Give the country id and corresponding count of cities in each country.", "output": "select country_id, count(*) from locations group by country_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display job ID for those jobs that were done by two or more for more than 300 days.", "output": "select job_id from job_history where end_date - start_date > 300 group by job_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the job ids for jobs done more than once for a period of more than 300 days?", "output": "select job_id from job_history where end_date - start_date > 300 group by job_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Pat. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the ID for those employees who did two or more jobs in the past.", "output": "select employee_id from job_history group by employee_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the employee ids for employees who have held two or more jobs?", "output": "select employee_id from job_history group by employee_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find employee with ID and name of the country presently where (s)he is working.", "output": "select t1.employee_id, t4.country_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id join countries as t4 on t3.country_id = t4.country_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are all the employee ids and the names of the countries in which they work?", "output": "select t1.employee_id, t4.country_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id join countries as t4 on t3.country_id = t4.country_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the department name and number of employees in each of the department.", "output": "select t2.department_name, count(*) from employees as t1 join departments as t2 on t1.department_id = t2.department_id group by t2.department_name"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Give the name of each department and the number of employees in each.", "output": "select t2.department_name, count(*) from employees as t1 join departments as t2 on t1.department_id = t2.department_id group by t2.department_name"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?", "output": "select * from job_history as t1 join employees as t2 on t1.employee_id = t2.employee_id where t2.salary >= 12000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the job history info done by employees earning a salary greater than or equal to 12000?", "output": "select * from job_history as t1 join employees as t2 on t1.employee_id = t2.employee_id where t2.salary >= 12000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display job title and average salary of employees.", "output": "select job_title, avg(salary) from employees as t1 join jobs as t2 on t1.job_id = t2.job_id group by t2.job_title"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is the average salary for each job title?", "output": "select job_title, avg(salary) from employees as t1 join jobs as t2 on t1.job_id = t2.job_id group by t2.job_title"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?", "output": "select first_name, last_name from employees where salary > (select salary from employees where employee_id = 163 )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Provide the full names of employees earning more than the employee with id 163.", "output": "select first_name, last_name from employees where salary > (select salary from employees where employee_id = 163 )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "return the smallest salary for every departments.", "output": "select min(salary), department_id from employees group by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is the minimum salary in each department?", "output": "select min(salary), department_id from employees group by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find the first name and last name and department id for those employees who earn such amount of salary which is the smallest salary of any of the departments.", "output": "select first_name, last_name, department_id from employees where salary in (select min(salary) from employees group by department_id)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full names and department ids for the lowest paid employees across all departments.", "output": "select first_name, last_name, department_id from employees where salary in (select min(salary) from employees group by department_id)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find the employee id for all employees who earn more than the average salary.", "output": "select employee_id from employees where salary > (select avg(salary) from employees)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the employee ids for employees who make more than the average?", "output": "select employee_id from employees where salary > (select avg(salary) from employees)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Payam. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee id and salary of all employees who report to Payam (first name).", "output": "select employee_id, salary from employees where manager_id = (select employee_id from employees where first_name = 'Payam' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Payam. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the employee ids of employees who report to Payam, and what are their salaries?", "output": "select employee_id, salary from employees where manager_id = (select employee_id from employees where first_name = 'Payam' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "find the name of all departments that do actually have one or more employees assigned to them.", "output": "select distinct t2.department_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the names of departments that have at least one employee.", "output": "select distinct t2.department_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "get the details of employees who manage a department.", "output": "select distinct * from employees as t1 join departments as t2 on t1.department_id = t2.department_id where t1.employee_id = t2.manager_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the information regarding employees who are managers?", "output": "select distinct * from employees as t1 join departments as t2 on t1.department_id = t2.department_id where t1.employee_id = t2.manager_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. The department_name contains values such as Marketing. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display all the information about the department Marketing.", "output": "select * from departments where department_name = 'Marketing'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. The department_name contains values such as Marketing. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the information about the Marketing department?", "output": "select * from departments where department_name = 'Marketing'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Pat. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the ID for those employees who did two or more jobs in the past.", "output": "select employee_id from job_history group by employee_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the employee ids for those who had two or more jobs.", "output": "select employee_id from job_history group by employee_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the unique ids of those departments where any manager is managing 4 or more employees.", "output": "select distinct department_id from employees group by department_id, manager_id having count(employee_id) >= 4"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?", "output": "select distinct department_id from employees group by department_id, manager_id having count(employee_id) >= 4"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find the job ID for those jobs which average salary is above 8000.", "output": "select job_id from employees group by job_id having avg(salary) > 8000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the job ids corresponding to jobs with average salary above 8000?", "output": "select job_id from employees group by job_id having avg(salary) > 8000"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee ID and job name for all those jobs in department 80.", "output": "select t1.employee_id, t2.job_title from employees as t1 join jobs as t2 on t1.job_id = t2.job_id where t1.department_id = 80"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "what are the employee ids and job titles for employees in department 80?", "output": "select t1.employee_id, t2.job_title from employees as t1 join jobs as t2 on t1.job_id = t2.job_id where t1.department_id = 80"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. The department_name contains values such as Finance. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is the first name and job id for all employees in the Finance department?", "output": "select t1.first_name, t1.job_id from employees as t1 join departments as t2 on t1.department_id = t2.department_id where t2.department_name = 'Finance'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. The department_name contains values such as Finance. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Give the first name and job id for all employees in the Finance department.", "output": "select t1.first_name, t1.job_id from employees as t1 join departments as t2 on t1.department_id = t2.department_id where t2.department_name = 'Finance'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display all the information of the employees whose salary if within the range of smallest salary and 2500.", "output": "select * from employees where salary between (select min(salary) from employees) and 2500"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the information regarding employees with salaries above the minimum and under 2500?", "output": "select * from employees where salary between (select min(salary) from employees) and 2500"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200.", "output": "select * from employees where department_id not in (select department_id from departments where manager_id between 100 and 200)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the ids for employees who do not work in departments with managers that have ids between 100 and 200?", "output": "select * from employees where department_id not in (select department_id from departments where manager_id between 100 and 200)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Clara. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara.", "output": "select first_name, last_name, hire_date from employees where department_id = (select department_id from employees where first_name = \"Clara\")"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Clara. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full names and hire dates for employees in the same department as someone with the first name Clara?", "output": "select first_name, last_name, hire_date from employees where department_id = (select department_id from employees where first_name = \"Clara\")"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Clara. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.", "output": "select first_name, last_name, hire_date from employees where department_id = ( select department_id from employees where first_name = \"Clara\") and first_name != \"Clara\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The first_name contains values such as Clara. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?", "output": "select first_name, last_name, hire_date from employees where department_id = ( select department_id from employees where first_name = \"Clara\") and first_name != \"Clara\""}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a \u2019T\u2019.", "output": "select employee_id, first_name, last_name from employees where department_id in ( select department_id from employees where first_name like '%t%' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the ids and full names for employees who work in a department that has someone with a first name that contains the letter T?", "output": "select employee_id, first_name, last_name from employees where department_id in ( select department_id from employees where first_name like '%t%' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.", "output": "select employee_id, first_name, last_name, salary from employees where salary > ( select avg (salary) from employees ) and department_id in ( select department_id from employees where first_name like '%j%')"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the ids, full names, and salaries for employees making more than average and who work in a department with employees who have the letter J in their first name?", "output": "select employee_id, first_name, last_name, salary from employees where salary > ( select avg (salary) from employees ) and department_id in ( select department_id from employees where first_name like '%j%')"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. The job_id contains values such as MK_MAN. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The job_id contains values such as MK_MAN. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.", "output": "select employee_id, job_id from employees where salary < ( select min(salary) from employees where job_id = 'MK_MAN' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. The job_id contains values such as MK_MAN. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The job_id contains values such as MK_MAN. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the employee ids and job ids for employees who make less than the lowest earning employee with title MK_MAN?", "output": "select employee_id, job_id from employees where salary < ( select min(salary) from employees where job_id = 'MK_MAN' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. The job_id contains values such as PU_MAN. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The job_id contains values such as PU_MAN. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the employee number, name( first name and last name ) and job title for all employees whose salary is more than any salary of those employees whose job title is PU_MAN.", "output": "select employee_id, first_name, last_name, job_id from employees where salary > ( select max(salary) from employees where job_id = 'PU_MAN' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. The job_id contains values such as PU_MAN. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. The job_id contains values such as PU_MAN. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the employee ids, full names, and job ids for employees who make more than the highest earning employee with title PU_MAN?", "output": "select employee_id, first_name, last_name, job_id from employees where salary > ( select max(salary) from employees where job_id = 'PU_MAN' )"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the department id and the total salary for those departments which contains at least two employees.", "output": "select department_id, sum(salary) from employees group by department_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are total salaries and department id for each department that has more than 2 employees?", "output": "select department_id, sum(salary) from employees group by department_id having count(*) >= 2"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display all the information of those employees who did not have any job in the past.", "output": "select * from employees where employee_id not in (select employee_id from job_history)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What is all the information about employees who have never had a job in the past?", "output": "select * from employees where employee_id not in (select employee_id from job_history)"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the department ID, full name (first and last name), salary for those employees who is highest salary in every department.", "output": "select first_name, last_name, salary, department_id, max(salary) from employees group by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the department ids, full names, and salaries for employees who make the most in their departments?", "output": "select first_name, last_name, salary, department_id, max(salary) from employees group by department_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the first and last name, department, city, and state province for each employee.", "output": "select t1.first_name, t1.last_name, t2.department_name, t3.city, t3.state_province from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full names, departments, cities, and state provinces for each employee?", "output": "select t1.first_name, t1.last_name, t2.department_name, t3.city, t3.state_province from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display those employees who contain a letter z to their first name and also display their last name, city.", "output": "select t1.first_name, t1.last_name, t3.city from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id where t1.first_name like '%z%'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the full names and cities of employees who have the letter Z in their first names?", "output": "select t1.first_name, t1.last_name, t3.city from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id where t1.first_name like '%z%'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the department name, city, and state province for each department.", "output": "select t1.department_name, t2.city, t2.state_province from departments as t1 join locations as t2 on t2.location_id = t1.location_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the department names, cities, and state provinces for each department?", "output": "select t1.department_name, t2.city, t2.state_province from departments as t1 join locations as t2 on t2.location_id = t1.location_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.", "output": "select t1.first_name, t1.last_name, t1.employee_id, t4.country_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id join countries as t4 on t3.country_id = t4.country_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What the full names, ids of each employee and the name of the country they are in?", "output": "select t1.first_name, t1.last_name, t1.employee_id, t4.country_name from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id join countries as t4 on t3.country_id = t4.country_id"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the department name and number of employees in each of the department.", "output": "select department_name, count(*) from employees as t1 join departments as t2 on t1.department_id = t2.department_id group by department_name"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are the department names and how many employees work in each of them?", "output": "select department_name, count(*) from employees as t1 join departments as t2 on t1.department_id = t2.department_id group by department_name"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The city contains values such as London. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "display the full name (first and last name), and salary of those employees who working in any department located in London.", "output": "select first_name, last_name, salary from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id where t3.city = 'London'"}, {"instruction": "hr_1 contains tables such as regions, countries, departments, jobs, employees, job_history, locations. Table regions has columns such as region_id, region_name. region_id is the primary key. Table countries has columns such as country_id, country_name, region_id. country_id is the primary key. Table departments has columns such as department_id, department_name, manager_id, location_id. department_id is the primary key. Table jobs has columns such as job_id, job_title, min_salary, max_salary. job_id is the primary key. Table employees has columns such as employee_id, first_name, last_name, email, phone_number, hire_date, job_id, salary, commission_pct, manager_id, department_id. employee_id is the primary key. Table job_history has columns such as employee_id, start_date, end_date, job_id, department_id. employee_id is the primary key. Table locations has columns such as location_id, street_address, postal_code, city, state_province, country_id. location_id is the primary key. The city contains values such as London. The region_id of countries is the foreign key of region_id of regions. The job_id of employees is the foreign key of job_id of jobs. The department_id of employees is the foreign key of department_id of departments. The job_id of job_history is the foreign key of job_id of jobs. The department_id of job_history is the foreign key of department_id of departments. The employee_id of job_history is the foreign key of employee_id of employees. The country_id of locations is the foreign key of country_id of countries.", "input": "What are full names and salaries of employees working in the city of London?", "output": "select first_name, last_name, salary from employees as t1 join departments as t2 on t1.department_id = t2.department_id join locations as t3 on t2.location_id = t3.location_id where t3.city = 'London'"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the name of the song that was released in the most recent year?", "output": "select song_name, releasedate from song order by releasedate desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the name of the song that was released most recently?", "output": "select song_name, releasedate from song order by releasedate desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the id of the longest song?", "output": "select f_id from files order by duration desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the id of the song that lasts the longest.", "output": "select f_id from files order by duration desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the names of all English songs.", "output": "select song_name from song where languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all songs in English?", "output": "select song_name from song where languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp3. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the id of songs whose format is mp3.", "output": "select f_id from files where formats = \"mp3\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp3. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the id of all the files in mp3 format?", "output": "select f_id from files where formats = \"mp3\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "List the name and country of origin for all singers who have produced songs with rating above 9.", "output": "select distinct t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.rating > 9"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the different names and countries of origins for all artists whose song ratings are above 9?", "output": "select distinct t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.rating > 9"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "List the file size and format for all songs that have resolution lower than 800.", "output": "select distinct t1.file_size, t1.formats from files as t1 join song as t2 on t1.f_id = t2.f_id where t2.resolution < 800"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the file sizes and formats for all songs with a resolution lower than 800?", "output": "select distinct t1.file_size, t1.formats from files as t1 join song as t2 on t1.f_id = t2.f_id where t2.resolution < 800"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the name of the artist who produced the shortest song?", "output": "select t1.artist_name from song as t1 join files as t2 on t1.f_id = t2.f_id order by t2.duration limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the artists who sang the shortest song?", "output": "select t1.artist_name from song as t1 join files as t2 on t1.f_id = t2.f_id order by t2.duration limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names and countries of origin for the artists who produced the top three highly rated songs.", "output": "select t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.rating desc limit 3"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the singers who sang the top 3 most highly rated songs and what countries do they hail from?", "output": "select t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.rating desc limit 3"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "How many songs have 4 minute duration?", "output": "select count(*) from files where duration like \"4:%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the count of the songs that last approximately 4 minutes?", "output": "select count(*) from files where duration like \"4:%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The most_popular_in contains values such as Bangladesh. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as Bangladesh. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as Bangladesh. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "How many artists are from Bangladesh?", "output": "select count(*) from artist where country = \"Bangladesh\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The most_popular_in contains values such as Bangladesh. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as Bangladesh. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as Bangladesh. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "How many Bangladeshi artists are listed?", "output": "select count(*) from artist where country = \"Bangladesh\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The gender contains values such as Female. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the average rating of songs produced by female artists?", "output": "select avg(t2.rating) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = \"Female\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The gender contains values such as Female. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "How many songs, on average, are sung by a female artist?", "output": "select avg(t2.rating) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = \"Female\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the most popular file format?", "output": "select formats from files group by formats order by count (*) desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the file format that is used by the most files.", "output": "select formats from files group by formats order by count (*) desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as UK. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as UK.The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the names of the artists who are from UK and have produced English songs.", "output": "select artist_name from artist where country = \"UK\" intersect select artist_name from song where languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as UK. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as UK.The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the artists that are from the UK and sang songs in English?", "output": "select artist_name from artist where country = \"UK\" intersect select artist_name from song where languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp4. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the id of songs that are available in mp4 format and have resolution lower than 1000.", "output": "select f_id from files where formats = \"mp4\" intersect select f_id from song where resolution < 1000"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp4. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?", "output": "select f_id from files where formats = \"mp4\" intersect select f_id from song where resolution < 1000"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The gender contains values such as Female. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as bangla. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the country of origin of the artist who is female and produced a song in Bangla?", "output": "select t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = \"Female\" and t2.languages = \"bangla\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The gender contains values such as Female. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as bangla. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What countries are the female artists who sung in the language Bangla from?", "output": "select t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t1.gender = \"Female\" and t2.languages = \"bangla\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp3. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the average duration of songs that have mp3 format and resolution below 800?", "output": "select avg(t1.duration) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = \"mp3\" and t2.resolution < 800"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp3. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the average song duration for the songs that are in mp3 format and whose resolution below 800?", "output": "select avg(t1.duration) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = \"mp3\" and t2.resolution < 800"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the number of artists for each gender?", "output": "select count(*), gender from artist group by gender"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The gender contains values such as Female, Male. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "How many artists are male and how many are female?", "output": "select count(*), gender from artist group by gender"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the average rating of songs for each language?", "output": "select avg(rating), languages from song group by languages"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the average song rating for each language?", "output": "select avg(rating), languages from song group by languages"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Return the gender and name of artist who produced the song with the lowest resolution.", "output": "select t1.gender, t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.resolution limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the gender and name of the artist who sang the song with the smallest resolution?", "output": "select t1.gender, t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name order by t2.resolution limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "For each file format, return the number of artists who released songs in that format.", "output": "select count(*), formats from files group by formats"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "How many songs were released for each format?", "output": "select count(*), formats from files group by formats"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the distinct names of all songs that have a higher resolution than some songs in English.", "output": "select distinct song_name from song where resolution > (select min(resolution) from song where languages = \"english\")"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the different names for all songs that have a higher resolution than English songs?", "output": "select distinct song_name from song where resolution > (select min(resolution) from song where languages = \"english\")"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as blues. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as blues. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as blues. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all songs that have a lower rating than some song of blues genre?", "output": "select song_name from song where rating < (select max(rating) from song where genre_is = \"blues\")"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as blues. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as blues. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as blues. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the songs that have a lower rating than at least one blues song?", "output": "select song_name from song where rating < (select max(rating) from song where genre_is = \"blues\")"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the name and country of origin of the artist who released a song that has \"love\" in its title?", "output": "select t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.song_name like \"%love%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the artists who released a song that has the word love in its title, and where are the artists from?", "output": "select t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.song_name like \"%love%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "List the name and gender for all artists who released songs in March.", "output": "select t1.artist_name, t1.gender from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.releasedate like \"%mar%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names and genders of all artists who released songs in the month of March?", "output": "select t1.artist_name, t1.gender from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.releasedate like \"%mar%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "List the names of all genres in alphabetical oder, together with its ratings.", "output": "select g_name, rating from genre order by g_name"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all genres in alphabetical order, combined with its ratings?", "output": "select g_name, rating from genre order by g_name"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Give me a list of the names of all songs ordered by their resolution.", "output": "select song_name from song order by resolution"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all songs that are ordered by their resolution numbers?", "output": "select song_name from song order by resolution"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp4. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the ids of songs that are available in either mp4 format or have resolution above 720?", "output": "select f_id from files where formats = \"mp4\" union select f_id from song where resolution > 720"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp4. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the ids of all songs that are available on mp4 or have a higher resolution than 720?", "output": "select f_id from files where formats = \"mp4\" union select f_id from song where resolution > 720"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "List the names of all songs that have 4 minute duration or are in English.", "output": "select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.duration like \"4:%\" union select song_name from song where languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all songs that are approximately 4 minutes long or are in English?", "output": "select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.duration like \"4:%\" union select song_name from song where languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the language used most often in the songs?", "output": "select languages from song group by languages order by count(*) desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the languages that are used most often in songs?", "output": "select languages from song group by languages order by count(*) desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the language that was used most often in songs with resolution above 500?", "output": "select artist_name from song where resolution > 500 group by languages order by count(*) desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?", "output": "select artist_name from song where resolution > 500 group by languages order by count(*) desc limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as UK.The gender contains values such as Male. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as UK. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of artists who are Male and are from UK?", "output": "select artist_name from artist where country = \"UK\" and gender = \"Male\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The gender contains values such as Male. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all male British artists?", "output": "select artist_name from artist where country = \"UK\" and gender = \"Male\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as modern. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as modern. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as modern.The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the names of songs whose genre is modern or language is English.", "output": "select song_name from song where genre_is = \"modern\" or languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as modern. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as modern. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as modern.The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the songs that are modern or sung in English?", "output": "select song_name from song where genre_is = \"modern\" or languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp3. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Return the names of songs for which format is mp3 and resolution is below 1000.", "output": "select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = \"mp3\" intersect select song_name from song where resolution < 1000"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. The formats contains values such as mp3. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all songs that are in mp3 format and have a resolution lower than 1000?", "output": "select t2.song_name from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.formats = \"mp3\" intersect select song_name from song where resolution < 1000"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as UK. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as UK.The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Return the names of singers who are from UK and released an English song.", "output": "select artist_name from artist where country = \"UK\" intersect select t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as UK. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as UK.The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of all singers that are from the UK and released a song in English?", "output": "select artist_name from artist where country = \"UK\" intersect select t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = \"english\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as bangla. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the average rating and resolution of songs that are in Bangla?", "output": "select avg(rating), avg(resolution) from song where languages = \"bangla\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as bangla. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the average rating and resolution of all bangla songs?", "output": "select avg(rating), avg(resolution) from song where languages = \"bangla\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the maximum and minimum resolution of songs whose duration is 3 minutes?", "output": "select max(t2.resolution), min(t2.resolution) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.duration like \"3:%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?", "output": "select max(t2.resolution), min(t2.resolution) from files as t1 join song as t2 on t1.f_id = t2.f_id where t1.duration like \"3:%\""}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the maximum duration and resolution of songs grouped and ordered by languages?", "output": "select max(t1.duration), max(t2.resolution), t2.languages from files as t1 join song as t2 on t1.f_id = t2.f_id group by t2.languages order by t2.languages"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?", "output": "select max(t1.duration), max(t2.resolution), t2.languages from files as t1 join song as t2 on t1.f_id = t2.f_id group by t2.languages order by t2.languages"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?", "output": "select min(t1.duration), min(t2.rating), t2.genre_is from files as t1 join song as t2 on t1.f_id = t2.f_id group by t2.genre_is order by t2.genre_is"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the shortest and most poorly rated song for each genre, ordered alphabetically by genre?", "output": "select min(t1.duration), min(t2.rating), t2.genre_is from files as t1 join song as t2 on t1.f_id = t2.f_id group by t2.genre_is order by t2.genre_is"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the names and number of works of all artists who have at least one English songs.", "output": "select t1.artist_name, count(*) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = \"english\" group by t2.artist_name having count(*) >= 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names and number of works for all artists who have sung at least one song in English?", "output": "select t1.artist_name, count(*) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = \"english\" group by t2.artist_name having count(*) >= 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the name and country of origin for all artists who have release at least one song of resolution above 900.", "output": "select t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.resolution > 900 group by t2.artist_name having count(*) >= 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the name and country of origin for each artist who has released a song with a resolution higher than 900?", "output": "select t1.artist_name, t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.resolution > 900 group by t2.artist_name having count(*) >= 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the names and number of works of the three artists who have produced the most songs.", "output": "select t1.artist_name, count(*) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name group by t2.artist_name order by count(*) desc limit 3"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the three artists who have produced the most songs, and how many works did they produce?", "output": "select t1.artist_name, count(*) from artist as t1 join song as t2 on t1.artist_name = t2.artist_name group by t2.artist_name order by count(*) desc limit 3"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the country of origin for the artist who made the least number of songs?", "output": "select t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name group by t2.artist_name order by count(*) limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What country is the artist who made the fewest songs from?", "output": "select t1.country from artist as t1 join song as t2 on t1.artist_name = t2.artist_name group by t2.artist_name order by count(*) limit 1"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the songs whose rating is below the rating of all songs in English?", "output": "select song_name from song where rating < (select min(rating) from song where languages = 'english')"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the song names for every song whose rating is less than the minimum rating for English songs?", "output": "select song_name from song where rating < (select min(rating) from song where languages = 'english')"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is ids of the songs whose resolution is higher than the resolution of any songs with rating lower than 8?", "output": "select f_id from song where resolution > (select max(resolution) from song where rating < 8)"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the id of every song that has a resolution higher than that of a song with a rating below 8?", "output": "select f_id from song where resolution > (select max(resolution) from song where rating < 8)"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as modern. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as modern. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as modern. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?", "output": "select f_id from song where resolution > (select avg(resolution) from song where genre_is = \"modern\")"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as modern. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as modern. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as modern. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the ids of all songs that have higher resolution of the average resolution in the modern genre?", "output": "select f_id from song where resolution > (select avg(resolution) from song where genre_is = \"modern\")"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as bangla. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the top 3 artists who have the largest number of songs works whose language is Bangla.", "output": "select t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = \"bangla\" group by t2.artist_name order by count(*) desc limit 3"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as bangla. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the top 3 artists with the largest number of songs in the language Bangla?", "output": "select t1.artist_name from artist as t1 join song as t2 on t1.artist_name = t2.artist_name where t2.languages = \"bangla\" group by t2.artist_name order by count(*) desc limit 3"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "List the id, genre and artist name of English songs ordered by rating.", "output": "select f_id, genre_is, artist_name from song where languages = \"english\" order by rating"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the id, genre, and name of the artist for every English song ordered by ascending rating?", "output": "select f_id, genre_is, artist_name from song where languages = \"english\" order by rating"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as pop. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as pop. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as pop. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "List the duration, file size and format of songs whose genre is pop, ordered by title?", "output": "select t1.duration, t1.file_size, t1.formats from files as t1 join song as t2 on t1.f_id = t2.f_id where t2.genre_is = \"pop\" order by t2.song_name"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The g_name contains values such as pop. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The preferred_genre contains values such as pop. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The genre_is contains values such as pop. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What is the duration, file size, and song format for every pop song, ordered by title alphabetically?", "output": "select t1.duration, t1.file_size, t1.formats from files as t1 join song as t2 on t1.f_id = t2.f_id where t2.genre_is = \"pop\" order by t2.song_name"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the names of the artists who have produced English songs but have never received rating higher than 8.", "output": "select distinct artist_name from song where languages = \"english\" except select distinct artist_name from song where rating > 8"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The languages contains values such as english. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?", "output": "select distinct artist_name from song where languages = \"english\" except select distinct artist_name from song where rating > 8"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The most_popular_in contains values such as Bangladesh. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as Bangladesh. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as Bangladesh. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "Find the names of the artists who are from Bangladesh and have never received rating higher than 7.", "output": "select distinct artist_name from artist where country = \"Bangladesh\" except select distinct artist_name from song where rating > 7"}, {"instruction": "music_1 contains tables such as genre, artist, files, song. Table genre has columns such as g_name, rating, most_popular_in. g_name is the primary key. The most_popular_in contains values such as Bangladesh. Table artist has columns such as artist_name, country, gender, preferred_genre. artist_name is the primary key. The country contains values such as Bangladesh. Table files has columns such as f_id, artist_name, file_size, duration, formats. f_id is the primary key. Table song has columns such as song_name, artist_name, country, f_id, genre_is, rating, languages, releasedate, resolution. song_name is the primary key. The country contains values such as Bangladesh. The preferred_genre of artist is the foreign key of g_name of genre. The artist_name of files is the foreign key of artist_name of artist. The genre_is of song is the foreign key of g_name of genre. The f_id of song is the foreign key of f_id of files. The artist_name of song is the foreign key of artist_name of artist.", "input": "What are the names of the different artists from Bangladesh who never received a rating higher than a 7?", "output": "select distinct artist_name from artist where country = \"Bangladesh\" except select distinct artist_name from song where rating > 7"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "what is the full name and id of the college with the largest number of baseball players?", "output": "select t1.name_full, t1.college_id from college as t1 join player_college as t2 on t1.college_id = t2.college_id group by t1.college_id order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the full name and id of the college that has the most baseball players.", "output": "select t1.name_full, t1.college_id from college as t1 join player_college as t2 on t1.college_id = t2.college_id group by t1.college_id order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is average salary of the players in the team named 'Boston Red Stockings' ?", "output": "select avg(t1.salary) from salary as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings'"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Compute the average salary of the players in the team called 'Boston Red Stockings'.", "output": "select avg(t1.salary) from salary as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings'"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are first and last names of players participating in all star game in 1998?", "output": "select name_first, name_last from player as t1 join all_star as t2 on t1.player_id = t2.player_id where year = 1998"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List the first and last name for players who participated in all star game in 1998.", "output": "select name_first, name_last from player as t1 join all_star as t2 on t1.player_id = t2.player_id where year = 1998"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The name_first contains values such as Count. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the first name, last name and id of the player with the most all star game experiences? Also list the count.", "output": "select t1.name_first, t1.name_last, t1.player_id, count(*) from player as t1 join all_star as t2 on t1.player_id = t2.player_id group by t1.player_id order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which player has the most all star game experiences? Give me the first name, last name and id of the player, as well as the number of times the player participated in all star game.", "output": "select t1.name_first, t1.name_last, t1.player_id, count(*) from player as t1 join all_star as t2 on t1.player_id = t2.player_id group by t1.player_id order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many players enter hall of fame each year?", "output": "select yearid, count(*) from hall_of_fame group by yearid;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The name_first contains values such as Count. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Count the number of players who enter hall of fame for each year.", "output": "select yearid, count(*) from hall_of_fame group by yearid;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Homer.The death_city contains values such as Homer. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the average number of attendance at home games for each year?", "output": "select year, avg(attendance) from home_game group by year;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Homer.The death_city contains values such as Homer. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "For each year, return the year and the average number of attendance at home games.", "output": "select year, avg(attendance) from home_game group by year;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "In 2014, what are the id and rank of the team that has the largest average number of attendance?", "output": "select t2.team_id, t2.rank from home_game as t1 join team as t2 on t1.team_id = t2.team_id where t1.year = 2014 group by t1.team_id order by avg(t1.attendance) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the id and rank of the team that has the highest average attendance rate in 2014.", "output": "select t2.team_id, t2.rank from home_game as t1 join team as t2 on t1.team_id = t2.team_id where t1.year = 2014 group by t1.team_id order by avg(t1.attendance) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Manager. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the manager's first name, last name and id who won the most manager award?", "output": "select t1.name_first, t1.name_last, t2.player_id from player as t1 join manager_award as t2 on t1.player_id = t2.player_id group by t2.player_id order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Manager. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which manager won the most manager award? Give me the manager's first name, last name and id.", "output": "select t1.name_first, t1.name_last, t2.player_id from player as t1 join manager_award as t2 on t1.player_id = t2.player_id group by t2.player_id order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The death_city contains values such as Park.The name_last contains values such as Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many parks are there in the state of NY?", "output": "select count(*) from park where state = 'NY';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_state contains values such as NY.The death_state contains values such as NY.The death_city contains values such as Park.The name_last contains values such as Show, Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The state contains values such as NY. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The state contains values such as NY. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Show me the number of parks the state of NY has.", "output": "select count(*) from park where state = 'NY';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which 3 players won the most player awards? List their full name and id.", "output": "select t1.name_first, t1.name_last, t1.player_id from player as t1 join player_award as t2 on t1.player_id = t2.player_id group by t1.player_id order by count(*) desc limit 3;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the first name, last name and id for the top three players won the most player awards.", "output": "select t1.name_first, t1.name_last, t1.player_id from player as t1 join player_award as t2 on t1.player_id = t2.player_id group by t1.player_id order by count(*) desc limit 3;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List three countries which are the origins of the least players.", "output": "select birth_country from player group by birth_country order by count(*) asc limit 3;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the three countries that the least players are from?", "output": "select birth_country from player group by birth_country order by count(*) asc limit 3;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find all the players' first name and last name who have empty death record.", "output": "select name_first, name_last from player where death_year = '';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the first name and last name of the players whose death record is empty?", "output": "select name_first, name_last from player where death_year = '';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_country contains values such as USA.The death_country contains values such as USA. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The country contains values such as USA. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many players born in USA are right-handed batters? That is, have the batter value 'R'.", "output": "select count(*) from player where birth_country = 'USA' and bats = 'R';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_country contains values such as USA.The death_country contains values such as USA.The name_first contains values such as Count. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The country contains values such as USA. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Count the number of players who were born in USA and have bats information 'R'.", "output": "select count(*) from player where birth_country = 'USA' and bats = 'R';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. The college_id contains values such as yale. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The name_first contains values such as Yale.The name_last contains values such as Yale. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The college_id contains values such as yale.The name_full contains values such as Yale University. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the average height of the players from the college named 'Yale University'?", "output": "select avg(t1.height) from player as t1 join player_college as t2 on t1.player_id = t2.player_id join college as t3 on t3.college_id = t2.college_id where t3.name_full = 'Yale University';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. The college_id contains values such as yale. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The name_first contains values such as Yale.The name_last contains values such as Yale. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The college_id contains values such as yale.The name_full contains values such as Yale University. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the average height of the players who belong to the college called 'Yale University'.", "output": "select avg(t1.height) from player as t1 join player_college as t2 on t1.player_id = t2.player_id join college as t3 on t3.college_id = t2.college_id where t3.name_full = 'Yale University';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the highest salary among each team? List the team name, id and maximum salary.", "output": "select t1.name, t1.team_id, max(t2.salary) from team as t1 join salary as t2 on t1.team_id = t2.team_id group by t1.team_id;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "For each team, return the team name, id and the maximum salary among the team.", "output": "select t1.name, t1.team_id, max(t2.salary) from team as t1 join salary as t2 on t1.team_id = t2.team_id group by t1.team_id;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the name and id of the team offering the lowest average salary?", "output": "select t1.name, t1.team_id from team as t1 join salary as t2 on t1.team_id = t2.team_id group by t1.team_id order by avg(t2.salary) asc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which team offers the lowest average salary? Give me the name and id of the team.", "output": "select t1.name, t1.team_id from team as t1 join salary as t2 on t1.team_id = t2.team_id group by t1.team_id order by avg(t2.salary) asc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the players' first name and last name who won award both in 1960 and in 1961.", "output": "select t1.name_first, t1.name_last from player as t1 join player_award as t2 where t2.year = 1960 intersect select t1.name_first, t1.name_last from player as t1 join player_award as t2 where t2.year = 1961"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which players won awards in both 1960 and 1961? Return their first names and last names.", "output": "select t1.name_first, t1.name_last from player as t1 join player_award as t2 where t2.year = 1960 intersect select t1.name_first, t1.name_last from player as t1 join player_award as t2 where t2.year = 1961"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The college_id contains values such as shorterga. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List players' first name and last name who have weight greater than 220 or height shorter than 75.", "output": "select name_first, name_last from player where weight > 220 or height < 75"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the first name and last name of the players who have weight above 220 or height below 75?", "output": "select name_first, name_last from player where weight > 220 or height < 75"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List the maximum scores of the team Boston Red Stockings when the team won in postseason?", "output": "select max(t1.wins) from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t2.name = 'Boston red Stockings';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the maximum scores the team Boston Red Stockings got when the team won in postseason?", "output": "select max(t1.wins) from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t2.name = 'Boston red Stockings';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many times did Boston Red Stockings lose in 2009 postseason?", "output": "select count(*) from postseason as t1 join team as t2 on t1.team_id_loser = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year = 2009;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Count, Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Count the number of times the team \"Boston Red Stockings\" lost in 2009 postseason.", "output": "select count(*) from postseason as t1 join team as t2 on t1.team_id_loser = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year = 2009;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the name and id of the team with the most victories in 2008 postseason?", "output": "select t2.name, t1.team_id_winner from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t1.year = 2008 group by t1.team_id_winner order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the name and id of the team that won the most times in 2008 postseason.", "output": "select t2.name, t1.team_id_winner from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t1.year = 2008 group by t1.team_id_winner order by count(*) desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?", "output": "select count(*), t1.year from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t2.name = 'Boston red Stockings' group by t1.year"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.", "output": "select count(*), t1.year from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t2.name = 'Boston red Stockings' group by t1.year"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the total number of postseason games that team Boston Red Stockings participated in?", "output": "select count(*) from ( select * from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t2.name = 'Boston red Stockings' union select * from postseason as t1 join team as t2 on t1.team_id_loser = t2.team_id_br where t2.name = 'Boston red Stockings' );"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many times in total did the team Boston Red Stockings participate in postseason games?", "output": "select count(*) from ( select * from postseason as t1 join team as t2 on t1.team_id_winner = t2.team_id_br where t2.name = 'Boston red Stockings' union select * from postseason as t1 join team as t2 on t1.team_id_loser = t2.team_id_br where t2.name = 'Boston red Stockings' );"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many games in 1885 postseason resulted in ties (that is, the value of \"ties\" is '1')?", "output": "select count(*) from postseason where year = 1885 and ties = 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the number of tied games (the value of \"ties\" is '1') in 1885 postseason.", "output": "select count(*) from postseason where year = 1885 and ties = 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the total salary paid by team Boston Red Stockings in 2010?", "output": "select sum(t1.salary) from salary as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year = 2010"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the total salary expenses of team Boston Red Stockings in 2010?", "output": "select sum(t1.salary) from salary as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year = 2010"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many players were in the team Boston Red Stockings in 2000?", "output": "select count(*) from salary as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year = 2000"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many players did Boston Red Stockings have in 2000?", "output": "select count(*) from salary as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year = 2000"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List the 3 highest salaries of the players in 2001?", "output": "select salary from salary where year = 2001 order by salary desc limit 3;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How much salary did the top 3 well-paid players get in 2001?", "output": "select salary from salary where year = 2001 order by salary desc limit 3;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What were all the salary values of players in 2010 and 2001?", "output": "select salary from salary where year = 2010 union select salary from salary where year = 2001"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List all the salary values players received in 2010 and 2001.", "output": "select salary from salary where year = 2010 union select salary from salary where year = 2001"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "In which year did the least people enter hall of fame?", "output": "select yearid from hall_of_fame group by yearid order by count(*) asc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the year in which the least people enter hall of fame.", "output": "select yearid from hall_of_fame group by yearid order by count(*) asc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Atlanta.The death_city contains values such as Atlanta, Park.The name_last contains values such as Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Atlanta. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Atlanta. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many parks are there in Atlanta city?", "output": "select count(*) from park where city = 'Atlanta';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Atlanta.The death_city contains values such as Atlanta, Park.The name_last contains values such as Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Atlanta. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Atlanta. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many parks does Atlanta city have?", "output": "select count(*) from park where city = 'Atlanta';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. The college_id contains values such as columbia. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Columbiana.The death_city contains values such as Columbia, Park.The name_last contains values such as Park. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The park_name contains values such as Columbia Park. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The college_id contains values such as columbia.The city contains values such as Columbia. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The park contains values such as Columbia Park. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many games were played in park \"Columbia Park\" in 1907?", "output": "select count(*) from home_game as t1 join park as t2 on t1.park_id = t2.park_id where t1.year = 1907 and t2.park_name = 'Columbia Park';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. The college_id contains values such as columbia. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Columbiana.The death_city contains values such as Columbia, Park.The name_first contains values such as Count.The name_last contains values such as Park. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The park_name contains values such as Columbia Park. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The college_id contains values such as columbia.The city contains values such as Columbia. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The park contains values such as Columbia Park. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Count the number of games taken place in park \"Columbia Park\" in 1907.", "output": "select count(*) from home_game as t1 join park as t2 on t1.park_id = t2.park_id where t1.year = 1907 and t2.park_name = 'Columbia Park';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Atlanta.The death_city contains values such as Atlanta. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Atlanta. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Atlanta. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many games were played in city Atlanta in 2000?", "output": "select count(*) from home_game as t1 join park as t2 on t1.park_id = t2.park_id where t1.year = 2000 and t2.city = 'Atlanta';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Atlanta.The death_city contains values such as Atlanta. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Atlanta. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Atlanta. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the number of games taken place in city Atlanta in 2000.", "output": "select count(*) from home_game as t1 join park as t2 on t1.park_id = t2.park_id where t1.year = 2000 and t2.city = 'Atlanta';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston, Homer.The death_city contains values such as Boston, Homer.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?", "output": "select sum(t1.attendance) from home_game as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year between 2000 and 2010;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many games in total did team Boston Red Stockings attend from 2000 to 2010?", "output": "select sum(t1.attendance) from home_game as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year between 2000 and 2010;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Leon.The death_city contains values such as Leon.The name_first contains values such as Len.The name_last contains values such as Barker. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?", "output": "select sum(t1.salary) from salary as t1 join player as t2 on t1.player_id = t2.player_id where t2.name_first = 'Len' and t2.name_last = 'Barker' and t1.year between 1985 and 1990;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Leon.The death_city contains values such as Leon.The name_first contains values such as Len.The name_last contains values such as Barker. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Compute the total salary that the player with first name Len and last name Barker received between 1985 to 1990.", "output": "select sum(t1.salary) from salary as t1 join player as t2 on t1.player_id = t2.player_id where t2.name_first = 'Len' and t2.name_last = 'Barker' and t1.year between 1985 and 1990;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. The college_id contains values such as washington. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Washington.The death_city contains values such as Washington.The name_first contains values such as Washington.The name_last contains values such as Washington. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Washington. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The college_id contains values such as washington.The city contains values such as Washington. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Washington Nationals. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Washington Nationals. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List players' first name and last name who received salary from team Washington Nationals in both 2005 and 2007.", "output": "select t2.name_first, t2.name_last from salary as t1 join player as t2 on t1.player_id = t2.player_id join team as t3 on t3.team_id_br = t1.team_id where t1.year = 2005 and t3.name = 'Washington Nationals' intersect select t2.name_first, t2.name_last from salary as t1 join player as t2 on t1.player_id = t2.player_id join team as t3 on t3.team_id_br = t1.team_id where t1.year = 2007 and t3.name = 'Washington Nationals'"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. The college_id contains values such as washington. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. The category contains values such as Player. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Washington.The death_city contains values such as Washington.The name_first contains values such as Washington.The name_last contains values such as Washington. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Washington. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The college_id contains values such as washington.The city contains values such as Washington. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Washington Nationals. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Washington Nationals. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?", "output": "select t2.name_first, t2.name_last from salary as t1 join player as t2 on t1.player_id = t2.player_id join team as t3 on t3.team_id_br = t1.team_id where t1.year = 2005 and t3.name = 'Washington Nationals' intersect select t2.name_first, t2.name_last from salary as t1 join player as t2 on t1.player_id = t2.player_id join team as t3 on t3.team_id_br = t1.team_id where t1.year = 2007 and t3.name = 'Washington Nationals'"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston, Homer.The death_city contains values such as Boston, Homer.The name_first contains values such as Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many home games did the team Boston Red Stockings play from 1990 to 2000 in total?", "output": "select sum(t1.games) from home_game as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year between 1990 and 2000;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Boston.The death_city contains values such as Boston.The name_first contains values such as Count, Red.The name_last contains values such as Boston. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. The city contains values such as Boston. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. The city contains values such as Boston. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. The name contains values such as Boston Red Stockings. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. The franchise_name contains values such as Boston Red Stockings. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Count the total number of games the team Boston Red Stockings attended from 1990 to 2000.", "output": "select sum(t1.games) from home_game as t1 join team as t2 on t1.team_id = t2.team_id_br where t2.name = 'Boston red Stockings' and t1.year between 1990 and 2000;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Homer.The death_city contains values such as Homer. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which team had the least number of attendances in home games in 1980?", "output": "select t2.name from home_game as t1 join team as t2 on t1.team_id = t2.team_id_br where t1.year = 1980 order by t1.attendance asc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The birth_city contains values such as Homer.The death_city contains values such as Homer. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the team that attended the least number of home games in 1980.", "output": "select t2.name from home_game as t1 join team as t2 on t1.team_id = t2.team_id_br where t1.year = 1980 order by t1.attendance asc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The death_city contains values such as Park.The name_last contains values such as Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "List the names of states that have more than 2 parks.", "output": "select state from park group by state having count(*) > 2;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The death_city contains values such as Park.The name_last contains values such as Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which states have more than 2 parks?", "output": "select state from park group by state having count(*) > 2;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "How many team franchises are active, with active value 'Y'?", "output": "select count(*) from team_franchise where active = 'Y';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find the number of team franchises that are active (have 'Y' as \"active\" information).", "output": "select count(*) from team_franchise where active = 'Y';"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The death_city contains values such as Park.The name_last contains values such as Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which cities have 2 to 4 parks?", "output": "select city from park group by city having count(*) between 2 and 4;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The death_city contains values such as Park.The name_last contains values such as Parks. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Find all the cities that have 2 to 4 parks.", "output": "select city from park group by city having count(*) between 2 and 4;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The death_city contains values such as Park.The name_last contains values such as Park. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which park had most attendances in 2008?", "output": "select t2.park_name from home_game as t1 join park as t2 on t1.park_id = t2.park_id where t1.year = 2008 order by t1.attendance desc limit 1;"}, {"instruction": "baseball_1 contains tables such as all_star, appearances, manager_award, player_award, manager_award_vote, player_award_vote, batting, batting_postseason, player_college, fielding, fielding_outfield, fielding_postseason, hall_of_fame, home_game, manager, manager_half, player, park, pitching, pitching_postseason, salary, college, postseason, team, team_franchise, team_half. Table all_star has columns such as player_id, year, game_num, game_id, team_id, league_id, gp, starting_pos. is the primary key. Table appearances has columns such as year, team_id, league_id, player_id, g_all, gs, g_batting, g_defense, g_p, g_c, g_1b, g_2b, g_3b, g_ss, g_lf, g_cf, g_rf, g_of, g_dh, g_ph, g_pr. is the primary key. Table manager_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table player_award has columns such as player_id, award_id, year, league_id, tie, notes. is the primary key. Table manager_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table player_award_vote has columns such as award_id, year, league_id, player_id, points_won, points_max, votes_first. is the primary key. Table batting has columns such as player_id, year, stint, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table batting_postseason has columns such as year, round, player_id, team_id, league_id, g, ab, r, h, double, triple, hr, rbi, sb, cs, bb, so, ibb, hbp, sh, sf, g_idp. is the primary key. Table player_college has columns such as player_id, college_id, year. is the primary key. Table fielding has columns such as player_id, year, stint, team_id, league_id, pos, g, gs, inn_outs, po, a, e, dp, pb, wp, sb, cs, zr. is the primary key. Table fielding_outfield has columns such as player_id, year, stint, glf, gcf, grf. is the primary key. Table fielding_postseason has columns such as player_id, year, team_id, league_id, round, pos, g, gs, inn_outs, po, a, e, dp, tp, pb, sb, cs. is the primary key. Table hall_of_fame has columns such as player_id, yearid, votedby, ballots, needed, votes, inducted, category, needed_note. is the primary key. Table home_game has columns such as year, league_id, team_id, park_id, span_first, span_last, games, openings, attendance. is the primary key. Table manager has columns such as player_id, year, team_id, league_id, inseason, g, w, l, rank, plyr_mgr. is the primary key. Table manager_half has columns such as player_id, year, team_id, league_id, inseason, half, g, w, l, rank. is the primary key. Table player has columns such as player_id, birth_year, birth_month, birth_day, birth_country, birth_state, birth_city, death_year, death_month, death_day, death_country, death_state, death_city, name_first, name_last, name_given, weight, height, bats, throws, debut, final_game, retro_id, bbref_id. is the primary key. The death_city contains values such as Park.The name_last contains values such as Park. Table park has columns such as park_id, park_name, park_alias, city, state, country. is the primary key. Table pitching has columns such as player_id, year, stint, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table pitching_postseason has columns such as player_id, year, round, team_id, league_id, w, l, g, gs, cg, sho, sv, ipouts, h, er, hr, bb, so, baopp, era, ibb, wp, hbp, bk, bfp, gf, r, sh, sf, g_idp. is the primary key. Table salary has columns such as year, team_id, league_id, player_id, salary. is the primary key. Table college has columns such as college_id, name_full, city, state, country. is the primary key. Table postseason has columns such as year, round, team_id_winner, league_id_winner, team_id_loser, league_id_loser, wins, losses, ties. is the primary key. Table team has columns such as year, league_id, team_id, franchise_id, div_id, rank, g, ghome, w, l, div_win, wc_win, lg_win, ws_win, r, ab, h, double, triple, hr, bb, so, sb, cs, hbp, sf, ra, er, era, cg, sho, sv, ipouts, ha, hra, bba, soa, e, dp, fp, name, park, attendance, bpf, ppf, team_id_br, team_id_lahman45, team_id_retro. is the primary key. Table team_franchise has columns such as franchise_id, franchise_name, active, na_assoc. is the primary key. Table team_half has columns such as year, league_id, team_id, half, div_id, div_win, rank, g, w, l. is the primary key. The player_id of all_star is the foreign key of player_id of player. The player_id of appearances is the foreign key of player_id of player. The team_id of appearances is the foreign key of team_id of team. The player_id of manager_award is the foreign key of player_id of player. The player_id of player_award is the foreign key of player_id of player. The player_id of player_award_vote is the foreign key of player_id of player. The player_id of batting is the foreign key of player_id of player. The team_id of batting_postseason is the foreign key of team_id of team. The player_id of batting_postseason is the foreign key of player_id of player. The college_id of player_college is the foreign key of college_id of college. The player_id of player_college is the foreign key of player_id of player. The player_id of fielding is the foreign key of player_id of player. The player_id of fielding_outfield is the foreign key of player_id of player. The player_id of fielding_postseason is the foreign key of player_id of player. The player_id of hall_of_fame is the foreign key of player_id of player. The park_id of home_game is the foreign key of park_id of park. The team_id of home_game is the foreign key of team_id of team. The team_id of manager is the foreign key of team_id of team. The team_id of manager_half is the foreign key of team_id of team.", "input": "Which park did the most people attend in 2008?", "output": "select t2.park_name from home_game as t1 join park as t2 on t1.park_id = t2.park_id where t1.year = 2008 order by t1.attendance desc limit 1;"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "How many camera lenses have a focal length longer than 15 mm?", "output": "select count(*) from camera_lens where focal_length_mm > 15"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "Find the brand and name for each camera lens, and sort in descending order of maximum aperture.", "output": "select brand, name from camera_lens order by max_aperture desc"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "List the id, color scheme, and name for all the photos.", "output": "select id, color, name from photos"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What are the maximum and average height of the mountains?", "output": "select max(height), avg(height) from mountain"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. The country contains values such as Morocco. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What are the average prominence of the mountains in country 'Morocco'?", "output": "select avg(prominence) from mountain where country = 'Morocco'"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. The range contains values such as Aberdare Range. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?", "output": "select name, height, prominence from mountain where range != 'Aberdare Range'"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What are the id and name of the photos for mountains?", "output": "select t1.id, t1.name from mountain as t1 join photos as t2 on t1.id = t2.mountain_id where t1.height > 4000"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What are the id and name of the mountains that have at least 2 photos?", "output": "select t1.id, t1.name from mountain as t1 join photos as t2 on t1.id = t2.mountain_id group by t1.id having count(*) >= 2"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What are the names of the cameras that have taken picture of the most mountains?", "output": "select t2.name from photos as t1 join camera_lens as t2 on t1.camera_lens_id = t2.id group by t2.id order by count(*) desc limit 1"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. The brand contains values such as Olympus, Sigma. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What are the names of photos taken with the lens brand 'Sigma' or 'Olympus'?", "output": "select t1.name from camera_lens as t1 join photos as t2 on t2.camera_lens_id = t1.id where t1.brand = 'Sigma' or t1.brand = 'Olympus'"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "How many different kinds of lens brands are there?", "output": "select count(distinct brand) from camera_lens"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "How many camera lenses are not used in taking any photos?", "output": "select count(*) from camera_lens where id not in ( select camera_lens_id from photos )"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. The country contains values such as Ethiopia. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?", "output": "select count(distinct t2.camera_lens_id) from mountain as t1 join photos as t2 on t1.id = t2.mountain_id where t1.country = 'Ethiopia'"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. The range contains values such as Lasta Massif, Toubkal Atlas. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "List the brands of lenses that took both a picture of mountains with range 'Toubkal Atlas' and a picture of mountains with range 'Lasta Massif'", "output": "select t3.brand from mountain as t1 join photos as t2 on t1.id = t2.mountain_id join camera_lens as t3 on t2.camera_lens_id = t3.id where t1.range = 'Toubkal Atlas' intersect select t3.brand from mountain as t1 join photos as t2 on t1.id = t2.mountain_id join camera_lens as t3 on t2.camera_lens_id = t3.id where t1.range = 'Lasta Massif'"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. The brand contains values such as Sigma. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.", "output": "select name, prominence from mountain except select t1.name, t1.prominence from mountain as t1 join photos as t2 on t1.id = t2.mountain_id join camera_lens as t3 on t2.camera_lens_id = t3.id where t3.brand = 'Sigma'"}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "List the camera lens names containing substring \"Digital\".", "output": "select name from camera_lens where name like \"%digital%\""}, {"instruction": "mountain_photos contains tables such as mountain, camera_lens, photos. Table mountain has columns such as id, name, height, prominence, range, country. id is the primary key. Table camera_lens has columns such as id, brand, name, focal_length_mm, max_aperture. id is the primary key. Table photos has columns such as id, camera_lens_id, mountain_id, color, name. id is the primary key. The mountain_id of photos is the foreign key of id of mountain. The camera_lens_id of photos is the foreign key of id of camera_lens.", "input": "What is the name of each camera lens and the number of photos taken by it? Order the result by the count of photos.", "output": "select t1.name, count(*) from camera_lens as t1 join photos as t2 on t1.id = t2.camera_lens_id group by t1.id order by count(*)"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. The owner contains values such as CCTV. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Find the names of channels that are not owned by CCTV.", "output": "select name from channel where owner != 'CCTV'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. The owner contains values such as CCTV. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Which channels are not owned by CCTV? Give me the channel names.", "output": "select name from channel where owner != 'CCTV'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "List all channel names ordered by their rating in percent from big to small.", "output": "select name from channel order by rating_in_percent desc"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Give me a list of all the channel names sorted by the channel rating in descending order.", "output": "select name from channel order by rating_in_percent desc"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "What is the owner of the channel that has the highest rating ratio?", "output": "select owner from channel order by rating_in_percent desc limit 1"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Show me the owner of the channel with the highest rating.", "output": "select owner from channel order by rating_in_percent desc limit 1"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "how many programs are there?", "output": "select count(*) from program"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Count the number of programs.", "output": "select count(*) from program"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "list all the names of programs, ordering by launch time.", "output": "select name from program order by launch"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "What is the list of program names, sorted by the order of launch date?", "output": "select name from program order by launch"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "List the name, origin and owner of each program.", "output": "select name, origin, owner from program"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "What are the name, origin and owner of each program?", "output": "select name, origin, owner from program"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "find the name of the program that was launched most recently.", "output": "select name from program order by launch desc limit 1"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Which program was launched most recently? Return the program name.", "output": "select name from program order by launch desc limit 1"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. The owner contains values such as CCTV. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "find the total percentage share of all channels owned by CCTV.", "output": "select sum(share_in_percent) from channel where owner = 'CCTV'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. The owner contains values such as CCTV. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "What is the total share (in percent) of all the channels owned by CCTV?", "output": "select sum(share_in_percent) from channel where owner = 'CCTV'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Find the names of the channels that are broadcast in the morning.", "output": "select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'Morning'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Which channels are broadcast in the morning? Give me the channel names.", "output": "select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'Morning'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning, Night. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "what are the names of the channels that broadcast in both morning and night?", "output": "select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'Morning' intersect select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'Night'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning, Night. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Which channels broadcast both in the morning and at night? Give me the channel names.", "output": "select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'Morning' intersect select t1.name from channel as t1 join broadcast as t2 on t1.channel_id = t2.channel_id where t2.time_of_day = 'Night'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "how many programs are broadcast in each time section of the day?", "output": "select count(*), time_of_day from broadcast group by time_of_day"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Count the number of programs broadcast for each time section of a day.", "output": "select count(*), time_of_day from broadcast group by time_of_day"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Night. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "find the number of different programs that are broadcast during night time.", "output": "select count(distinct program_id) from broadcast where time_of_day = 'Night'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Night. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "How many distinct programs are broadcast at \"Night\" time?", "output": "select count(distinct program_id) from broadcast where time_of_day = 'Night'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Find the names of programs that are never broadcasted in the morning.", "output": "select name from program except select t1.name from program as t1 join broadcast as t2 on t1.program_id = t2.program_id where t2.time_of_day = \"Morning\""}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Which programs are never broadcasted in the morning? Give me the names of the programs.", "output": "select name from program except select t1.name from program as t1 join broadcast as t2 on t1.program_id = t2.program_id where t2.time_of_day = \"Morning\""}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning, Night. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "find the program owners that have some programs in both morning and night time.", "output": "select t1.owner from program as t1 join broadcast as t2 on t1.program_id = t2.program_id where t2.time_of_day = \"Morning\" intersect select t1.owner from program as t1 join broadcast as t2 on t1.program_id = t2.program_id where t2.time_of_day = \"Night\""}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. The time_of_day contains values such as Morning, Night. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Who are the owners of the programs that broadcast both in the morning and at night?", "output": "select t1.owner from program as t1 join broadcast as t2 on t1.program_id = t2.program_id where t2.time_of_day = \"Morning\" intersect select t1.owner from program as t1 join broadcast as t2 on t1.program_id = t2.program_id where t2.time_of_day = \"Night\""}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "List all program origins in the alphabetical order.", "output": "select origin from program order by origin"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "What is the list of program origins ordered alphabetically?", "output": "select origin from program order by origin"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "what is the number of different channel owners?", "output": "select count(distinct owner) from channel"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Count the number of distinct channel owners.", "output": "select count(distinct owner) from channel"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. The origin contains values such as Beijing. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "find the names of programs whose origin is not in Beijing.", "output": "select name from program where origin != 'Beijing'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. The origin contains values such as Beijing. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Which programs' origins are not \"Beijing\"? Give me the program names.", "output": "select name from program where origin != 'Beijing'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. The owner contains values such as CCTV, HBS. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "What are the names of the channels owned by CCTV or HBS?", "output": "select name from channel where owner = 'CCTV' or owner = 'HBS'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. The owner contains values such as CCTV, HBS. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "List the names of all the channels owned by either CCTV or HBS", "output": "select name from channel where owner = 'CCTV' or owner = 'HBS'"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Find the total rating ratio for each channel owner.", "output": "select sum(rating_in_percent), owner from channel group by owner"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "What is the total rating of channel for each channel owner?", "output": "select sum(rating_in_percent), owner from channel group by owner"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Find the name of the program that is broadcast most frequently.", "output": "select t1.name from program as t1 join broadcast as t2 on t1.program_id = t2.program_id group by t2.program_id order by count(*) desc limit 1"}, {"instruction": "program_share contains tables such as program, channel, broadcast, broadcast_share. Table program has columns such as program_id, name, origin, launch, owner. program_id is the primary key. Table channel has columns such as channel_id, name, owner, share_in_percent, rating_in_percent. channel_id is the primary key. Table broadcast has columns such as channel_id, program_id, time_of_day. channel_id is the primary key. Table broadcast_share has columns such as channel_id, program_id, date, share_in_percent. channel_id is the primary key. The program_id of broadcast is the foreign key of program_id of program. The channel_id of broadcast is the foreign key of channel_id of channel. The program_id of broadcast_share is the foreign key of program_id of program. The channel_id of broadcast_share is the foreign key of channel_id of channel.", "input": "Which program is broadcast most frequently? Give me the program name.", "output": "select t1.name from program as t1 join broadcast as t2 on t1.program_id = t2.program_id group by t2.program_id order by count(*) desc limit 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "How many courses are there in total?", "output": "select count(*) from courses"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the total number of courses offered.", "output": "select count(*) from courses"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as database.The course_description contains values such as database. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the descriptions of the courses with name \"database\"?", "output": "select course_description from courses where course_name = \"database\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as database.The course_description contains values such as database. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Return the description for the courses named \"database\".", "output": "select course_description from courses where course_name = \"database\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. The personal_name contains values such as Cathrine. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the addresses of the course authors or tutors with personal name \"Cathrine\"", "output": "select address_line_1 from course_authors_and_tutors where personal_name = \"Cathrine\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. The personal_name contains values such as Cathrine. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Return the addresses of the course authors or tutors whose personal name is \"Cathrine\".", "output": "select address_line_1 from course_authors_and_tutors where personal_name = \"Cathrine\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List the addresses of all the course authors or tutors.", "output": "select address_line_1 from course_authors_and_tutors"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What is the address of each course author or tutor?", "output": "select address_line_1 from course_authors_and_tutors"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List all the login names and family names of course author and tutors.", "output": "select login_name, family_name from course_authors_and_tutors"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the login names and family names of course author and tutors?", "output": "select login_name, family_name from course_authors_and_tutors"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List all the dates of enrollment and completion of students.", "output": "select date_of_enrolment, date_of_completion from student_course_enrolment"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are all the dates of enrollment and completion in record?", "output": "select date_of_enrolment, date_of_completion from student_course_enrolment"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "How many distinct students are enrolled in courses?", "output": "select count(distinct student_id) from student_course_enrolment"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the number of distinct students enrolled in courses.", "output": "select count(distinct student_id) from student_course_enrolment"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "How many distinct courses are enrolled in by students?", "output": "select count(course_id) from student_course_enrolment"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the number of distinct courses that have enrolled students.", "output": "select count(course_id) from student_course_enrolment"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Pass. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the dates of the tests taken with result \"Pass\".", "output": "select date_test_taken from student_tests_taken where test_result = \"Pass\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Pass. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Which tests have \"Pass\" results? Return the dates when the tests were taken.", "output": "select date_test_taken from student_tests_taken where test_result = \"Pass\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Fail. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "How many tests have result \"Fail\"?", "output": "select count(*) from student_tests_taken where test_result = \"Fail\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Fail. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Count the number of tests with \"Fail\" result.", "output": "select count(*) from student_tests_taken where test_result = \"Fail\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The family_name contains values such as Ward. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the login names of the students with family name \"Ward\"?", "output": "select login_name from students where family_name = \"Ward\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The family_name contains values such as Ward. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Return the login names of the students whose family name is \"Ward\".", "output": "select login_name from students where family_name = \"Ward\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The family_name contains values such as Jaskolski, Langosh. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the dates of the latest logon of the students with family name \"Jaskolski\" or \"Langosh\"?", "output": "select date_of_latest_logon from students where family_name = \"Jaskolski\" or family_name = \"Langosh\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The family_name contains values such as Jaskolski, Langosh. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the latest logon date of the students whose family name is \"Jaskolski\" or \"Langosh\".", "output": "select date_of_latest_logon from students where family_name = \"Jaskolski\" or family_name = \"Langosh\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "How many students have personal names that contain the word \"son\"?", "output": "select count(*) from students where personal_name like \"%son%\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the number of students who have the word \"son\" in their personal names.", "output": "select count(*) from students where personal_name like \"%son%\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List all the subject names.", "output": "select subject_name from subjects"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the names of all the subjects.", "output": "select subject_name from subjects"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List all the information about course authors and tutors in alphabetical order of the personal name.", "output": "select * from course_authors_and_tutors order by personal_name"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Sort the information about course authors and tutors in alphabetical order of the personal name.", "output": "select * from course_authors_and_tutors order by personal_name"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List the personal names and family names of all the students in alphabetical order of family name.", "output": "select personal_name, family_name from students order by family_name"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the personal names and family names of the students? Sort the result in alphabetical order of the family name.", "output": "select personal_name, family_name from students order by family_name"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List each test result and its count in descending order of count.", "output": "select test_result, count(*) from student_tests_taken group by test_result order by count(*) desc"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "For each distinct test result, find the number of students who got the result.", "output": "select test_result, count(*) from student_tests_taken group by test_result order by count(*) desc"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as advanced database, database.The course_description contains values such as advanced database, database. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the login name of the course author that teaches the course with name \"advanced database\".", "output": "select t1.login_name from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id where t2.course_name = \"advanced database\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as advanced database, database.The course_description contains values such as advanced database, database. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Which course author teaches the \"advanced database\" course? Give me his or her login name.", "output": "select t1.login_name from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id where t2.course_name = \"advanced database\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as operating system, data structure.The course_description contains values such as operating system, data structure. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the addresses of the course authors who teach the course with name \"operating system\" or \"data structure\".", "output": "select t1.address_line_1 from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id where t2.course_name = \"operating system\" or t2.course_name = \"data structure\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as operating system, data structure.The course_description contains values such as operating system, data structure. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the addresses of the course authors who teach either \"operating system\" or \"data structure\" course.", "output": "select t1.address_line_1 from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id where t2.course_name = \"operating system\" or t2.course_name = \"data structure\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the personal name, family name, and author ID of the course author that teaches the most courses.", "output": "select t1.personal_name, t1.family_name, t2.author_id from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id group by t2.author_id order by count(*) desc limit 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the personal name, family name, and author ID of the course author who teaches the most courses?", "output": "select t1.personal_name, t1.family_name, t2.author_id from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id group by t2.author_id order by count(*) desc limit 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the addresses and author IDs of the course authors that teach at least two courses.", "output": "select t1.address_line_1, t2.author_id from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id group by t2.author_id having count(*) >= 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Which course authors teach two or more courses? Give me their addresses and author IDs.", "output": "select t1.address_line_1, t2.author_id from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id group by t2.author_id having count(*) >= 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. The personal_name contains values such as Julio. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the names of courses taught by the tutor who has personal name \"Julio\".", "output": "select t2.course_name from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id where t1.personal_name = \"Julio\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. The personal_name contains values such as Julio. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the names of the courses taught by the tutor whose personal name is \"Julio\"?", "output": "select t2.course_name from course_authors_and_tutors as t1 join courses as t2 on t1.author_id = t2.author_id where t1.personal_name = \"Julio\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. The subject_name contains values such as Computer Science. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the names and descriptions of courses that belong to the subject named \"Computer Science\".", "output": "select t1.course_name, t1.course_description from courses as t1 join subjects as t2 on t1.subject_id = t2.subject_id where t2.subject_name = \"Computer Science\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. The subject_name contains values such as Computer Science. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the names and descriptions of the all courses under the \"Computer Science\" subject?", "output": "select t1.course_name, t1.course_description from courses as t1 join subjects as t2 on t1.subject_id = t2.subject_id where t2.subject_name = \"Computer Science\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the subject ID, subject name, and the corresponding number of available courses for each subject.", "output": "select t1.subject_id, t2.subject_name, count(*) from courses as t1 join subjects as t2 on t1.subject_id = t2.subject_id group by t1.subject_id"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the subject ID, subject name, and the number of available courses for each subject?", "output": "select t1.subject_id, t2.subject_name, count(*) from courses as t1 join subjects as t2 on t1.subject_id = t2.subject_id group by t1.subject_id"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.", "output": "select t1.subject_id, t2.subject_name, count(*) from courses as t1 join subjects as t2 on t1.subject_id = t2.subject_id group by t1.subject_id order by count(*) asc"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List the subject ID, name of subject and the number of courses available for each subject in ascending order of the course counts.", "output": "select t1.subject_id, t2.subject_name, count(*) from courses as t1 join subjects as t2 on t1.subject_id = t2.subject_id group by t1.subject_id order by count(*) asc"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as Spanish.The course_description contains values such as Spanish. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What is the date of enrollment of the course named \"Spanish\"?", "output": "select t2.date_of_enrolment from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id where t1.course_name = \"Spanish\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. The course_name contains values such as Spanish.The course_description contains values such as Spanish. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the the date of enrollment of the \"Spanish\" course.", "output": "select t2.date_of_enrolment from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id where t1.course_name = \"Spanish\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What is the name of the course that has the most student enrollment?", "output": "select t1.course_name from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name order by count(*) desc limit 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Which course is enrolled in by the most students? Give me the course name.", "output": "select t1.course_name from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name order by count(*) desc limit 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the names of the courses that have exactly 1 student enrollment?", "output": "select t1.course_name from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name having count(*) = 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the names of the courses that have just one student enrollment.", "output": "select t1.course_name from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name having count(*) = 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the descriptions and names of the courses that have student enrollment bigger than 2?", "output": "select t1.course_description, t1.course_name from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name having count(*) > 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Return the descriptions and names of the courses that have more than two students enrolled in.", "output": "select t1.course_description, t1.course_name from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name having count(*) > 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What is the name of each course and the corresponding number of student enrollment?", "output": "select t1.course_name, count(*) from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List the name and the number of enrolled student for each course.", "output": "select t1.course_name, count(*) from courses as t1 join student_course_enrolment as t2 on t1.course_id = t2.course_id group by t1.course_name"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Pass. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the enrollment dates of all the tests that have result \"Pass\"?", "output": "select t1.date_of_enrolment from student_course_enrolment as t1 join student_tests_taken as t2 on t1.registration_id = t2.registration_id where t2.test_result = \"Pass\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Pass. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the enrollment date for all the tests that have \"Pass\" result.", "output": "select t1.date_of_enrolment from student_course_enrolment as t1 join student_tests_taken as t2 on t1.registration_id = t2.registration_id where t2.test_result = \"Pass\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Fail. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the completion dates of all the tests that have result \"Fail\"?", "output": "select t1.date_of_completion from student_course_enrolment as t1 join student_tests_taken as t2 on t1.registration_id = t2.registration_id where t2.test_result = \"Fail\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The test_result contains values such as Fail. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Return the completion date for all the tests that have \"Fail\" result.", "output": "select t1.date_of_completion from student_course_enrolment as t1 join student_tests_taken as t2 on t1.registration_id = t2.registration_id where t2.test_result = \"Fail\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The personal_name contains values such as Karson. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List the dates of enrollment and completion of the student with personal name \"Karson\".", "output": "select t1.date_of_enrolment, t1.date_of_completion from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id where t2.personal_name = \"Karson\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The personal_name contains values such as Karson. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "On what dates did the student whose personal name is \"Karson\" enroll in and complete the courses?", "output": "select t1.date_of_enrolment, t1.date_of_completion from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id where t2.personal_name = \"Karson\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The personal_name contains values such as Bernie.The family_name contains values such as Zieme. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "List the dates of enrollment and completion of the student with family name \"Zieme\" and personal name \"Bernie\".", "output": "select t1.date_of_enrolment, t1.date_of_completion from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id where t2.family_name = \"Zieme\" and t2.personal_name = \"Bernie\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. The personal_name contains values such as Bernie.The family_name contains values such as Zieme. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "On what dates did the student with family name \"Zieme\" and personal name \"Bernie\" enroll in and complete the courses?", "output": "select t1.date_of_enrolment, t1.date_of_completion from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id where t2.family_name = \"Zieme\" and t2.personal_name = \"Bernie\""}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the student ID and login name of the student with the most course enrollments", "output": "select t1.student_id, t2.login_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the student ID and login name of the student who are enrolled in the most courses?", "output": "select t1.student_id, t2.login_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id order by count(*) desc limit 1"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the student ID and personal name of the student with at least two enrollments.", "output": "select t1.student_id, t2.personal_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id having count(*) >= 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Which student are enrolled in at least two courses? Give me the student ID and personal name.", "output": "select t1.student_id, t2.personal_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id having count(*) >= 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the student ID and middle name for all the students with at most two enrollments.", "output": "select t1.student_id, t2.middle_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id having count(*) <= 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the student IDs and middle names of the students enrolled in at most two courses?", "output": "select t1.student_id, t2.middle_name from student_course_enrolment as t1 join students as t2 on t1.student_id = t2.student_id group by t1.student_id having count(*) <= 2"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the personal names of students not enrolled in any course.", "output": "select personal_name from students except select t1.personal_name from students as t1 join student_course_enrolment as t2 on t1.student_id = t2.student_id"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Which students not enrolled in any course? Find their personal names.", "output": "select personal_name from students except select t1.personal_name from students as t1 join student_course_enrolment as t2 on t1.student_id = t2.student_id"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "How many students did not have any course enrollment?", "output": "select count(*) from students where student_id not in (select student_id from student_course_enrolment)"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Count the number of students who did not enroll in any course.", "output": "select count(*) from students where student_id not in (select student_id from student_course_enrolment)"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the common login name of course authors and students.", "output": "select login_name from course_authors_and_tutors intersect select login_name from students"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the login names used both by some course authors and some students?", "output": "select login_name from course_authors_and_tutors intersect select login_name from students"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "Find the common personal name of course authors and students.", "output": "select personal_name from course_authors_and_tutors intersect select personal_name from students"}, {"instruction": "e_learning contains tables such as course_authors_and_tutors, students, subjects, courses, student_course_enrolment, student_tests_taken. Table course_authors_and_tutors has columns such as author_id, author_tutor_atb, login_name, password, personal_name, middle_name, family_name, gender_mf, address_line_1. author_id is the primary key. Table students has columns such as student_id, date_of_registration, date_of_latest_logon, login_name, password, personal_name, middle_name, family_name. student_id is the primary key. Table subjects has columns such as subject_id, subject_name. subject_id is the primary key. Table courses has columns such as course_id, author_id, subject_id, course_name, course_description. course_id is the primary key. Table student_course_enrolment has columns such as registration_id, student_id, course_id, date_of_enrolment, date_of_completion. registration_id is the primary key. Table student_tests_taken has columns such as registration_id, date_test_taken, test_result. is the primary key. The subject_id of courses is the foreign key of subject_id of subjects. The author_id of courses is the foreign key of author_id of course_authors_and_tutors. The student_id of student_course_enrolment is the foreign key of student_id of students. The course_id of student_course_enrolment is the foreign key of course_id of courses. The registration_id of student_tests_taken is the foreign key of registration_id of student_course_enrolment.", "input": "What are the personal names used both by some course authors and some students?", "output": "select personal_name from course_authors_and_tutors intersect select personal_name from students"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which claims caused more than 2 settlements or have the maximum claim value? List the date the claim was made and the claim id.", "output": "select t1.date_claim_made, t1.claim_id from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id having count(*) > 2 union select t1.date_claim_made, t1.claim_id from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id where t1.amount_claimed = ( select max(amount_claimed) from claims )"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the claims that led to more than two settlements or have the maximum claim value. For each of them, return the date the claim was made and the id of the claim.", "output": "select t1.date_claim_made, t1.claim_id from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id having count(*) > 2 union select t1.date_claim_made, t1.claim_id from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id where t1.amount_claimed = ( select max(amount_claimed) from claims )"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which customer had at least 2 policies but did not file any claims? List the customer details and id.", "output": "select t1.customer_details, t1.customer_id from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) >= 2 except select t1.customer_details, t1.customer_id from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id join claims as t3 on t2.policy_id = t3.policy_id"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Give me the the customer details and id for the customers who had two or more policies but did not file any claims.", "output": "select t1.customer_details, t1.customer_id from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) >= 2 except select t1.customer_details, t1.customer_id from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id join claims as t3 on t2.policy_id = t3.policy_id"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "List the method, date and amount of all the payments, in ascending order of date.", "output": "select payment_method_code, date_payment_made, amount_payment from payments order by date_payment_made asc"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What are the method, date and amount of each payment? Sort the list in ascending order of date.", "output": "select payment_method_code, date_payment_made, amount_payment from payments order by date_payment_made asc"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Among all the claims, what is the settlement amount of the claim with the largest claim amount? List both the settlement amount and claim amount.", "output": "select amount_settled, amount_claimed from claims order by amount_claimed desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.", "output": "select amount_settled, amount_claimed from claims order by amount_claimed desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount.", "output": "select amount_settled, amount_claimed from claims order by amount_settled asc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the claimed amount in the claim with the least amount settled. Show both the settlement amount and claim amount.", "output": "select amount_settled, amount_claimed from claims order by amount_settled asc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Among all the claims, which claims have a claimed amount larger than the average? List the date the claim was made and the date it was settled.", "output": "select date_claim_made, date_claim_settled from claims where amount_claimed > ( select avg(amount_claimed) from claims )"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.", "output": "select date_claim_made, date_claim_settled from claims where amount_claimed > ( select avg(amount_claimed) from claims )"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.", "output": "select date_claim_made from claims where amount_settled <= ( select avg(amount_settled) from claims )"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Return the claim start date for the claims whose claimed amount is no more than the average", "output": "select date_claim_made from claims where amount_settled <= ( select avg(amount_settled) from claims )"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "How many settlements does each claim correspond to? List the claim id and the number of settlements.", "output": "select t1.claim_id, count(*) from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the number of settlements each claim corresponds to. Show the number together with the claim id.", "output": "select t1.claim_id, count(*) from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which claim incurred the most number of settlements? List the claim id, the date the claim was made, and the number.", "output": "select t1.claim_id, t1.date_claim_made, count(*) from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id order by count(*) desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the claim id and claim date of the claim that incurred the most settlement count. Also tell me the count.", "output": "select t1.claim_id, t1.date_claim_made, count(*) from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id order by count(*) desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "How many settlements were made on the claim with the most recent claim settlement date? List the number and the claim id.", "output": "select count(*), t1.claim_id from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id order by t1.date_claim_settled desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the claim id and the number of settlements made for the claim with the most recent settlement date.", "output": "select count(*), t1.claim_id from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id order by t1.date_claim_settled desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Of all the claims, what was the earliest date when any claim was made?", "output": "select date_claim_made from claims order by date_claim_made asc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Tell me the the date when the first claim was made.", "output": "select date_claim_made from claims order by date_claim_made asc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What is the total amount of settlement made for all the settlements?", "output": "select sum(amount_settled) from settlements"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Compute the total amount of settlement across all the settlements.", "output": "select sum(amount_settled) from settlements"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Who are the customers that had more than 1 policy? List the customer details and id.", "output": "select t1.customer_details, t1.customer_id from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) > 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the the customer details and id for the customers who had more than one policy.", "output": "select t1.customer_details, t1.customer_id from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) > 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What are the claim dates and settlement dates of all the settlements?", "output": "select date_claim_made, date_claim_settled from settlements"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Tell me the the claim date and settlement date for each settlement case.", "output": "select date_claim_made, date_claim_settled from settlements"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What is the most popular payment method?", "output": "select payment_method_code from payments group by payment_method_code order by count(*) desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which payment method is used the most often?", "output": "select payment_method_code from payments group by payment_method_code order by count(*) desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "With which kind of payment method were the least number of payments processed?", "output": "select payment_method_code from payments group by payment_method_code order by count(*) asc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What is the payment method that were used the least often?", "output": "select payment_method_code from payments group by payment_method_code order by count(*) asc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What is the total amount of payment?", "output": "select sum(amount_payment) from payments"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Compute the total amount of payment processed.", "output": "select sum(amount_payment) from payments"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What are all the distinct details of the customers?", "output": "select distinct customer_details from customers"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Return the distinct customer details.", "output": "select distinct customer_details from customers"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which kind of policy type was chosen by the most customers?", "output": "select policy_type_code from customer_policies group by policy_type_code order by count(*) desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the policy type the most customers choose.", "output": "select policy_type_code from customer_policies group by policy_type_code order by count(*) desc limit 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "How many settlements are there in total?", "output": "select count(*) from settlements"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Count the total number of settlements made.", "output": "select count(*) from settlements"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The payment_method_code contains values such as Visa. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which Payments were processed with Visa? List the payment Id, the date and the amount.", "output": "select payment_id, date_payment_made, amount_payment from payments where payment_method_code = 'Visa'"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The payment_method_code contains values such as Visa. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Give me the payment Id, the date and the amount for all the payments processed with Visa.", "output": "select payment_id, date_payment_made, amount_payment from payments where payment_method_code = 'Visa'"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "List the details of the customers who do not have any policies.", "output": "select customer_details from customers except select t1.customer_details from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which customers do not have any policies? Find the details of these customers.", "output": "select customer_details from customers except select t1.customer_details from customers as t1 join customer_policies as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.", "output": "select t1.claim_id, t1.date_claim_made, t1.date_claim_settled from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id having count(*) = 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled.", "output": "select t1.claim_id, t1.date_claim_made, t1.date_claim_settled from claims as t1 join settlements as t2 on t1.claim_id = t2.claim_id group by t1.claim_id having count(*) = 1"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "Find the total claimed amount of all the claims.", "output": "select sum(amount_claimed) from claims"}, {"instruction": "insurance_policies contains tables such as customers, customer_policies, claims, settlements, payments. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table customer_policies has columns such as policy_id, customer_id, policy_type_code, start_date, end_date. policy_id is the primary key. Table claims has columns such as claim_id, policy_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled. claim_id is the primary key. Table settlements has columns such as settlement_id, claim_id, date_claim_made, date_claim_settled, amount_claimed, amount_settled, customer_policy_id. settlement_id is the primary key. Table payments has columns such as payment_id, settlement_id, payment_method_code, date_payment_made, amount_payment. payment_id is the primary key. The customer_id of customer_policies is the foreign key of customer_id of customers. The policy_id of claims is the foreign key of policy_id of customer_policies. The claim_id of settlements is the foreign key of claim_id of claims. The settlement_id of payments is the foreign key of settlement_id of settlements.", "input": "What is total amount claimed summed across all the claims?", "output": "select sum(amount_claimed) from claims"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which department has the largest number of employees?", "output": "select name from department group by departmentid order by count(departmentid) desc limit 1;"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the department with the most employees.", "output": "select name from department group by departmentid order by count(departmentid) desc limit 1;"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the employee id of the head whose department has the least number of employees?", "output": "select head from department group by departmentid order by count(departmentid) limit 1;"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Tell me the employee id of the head of the department with the least employees.", "output": "select head from department group by departmentid order by count(departmentid) limit 1;"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "what is the name and position of the head whose department has least number of employees?", "output": "select t2.name, t2.position from department as t1 join physician as t2 on t1.head = t2.employeeid group by departmentid order by count(departmentid) limit 1;"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name and position of the head of the department with the least employees.", "output": "select t2.name, t2.position from department as t1 join physician as t2 on t1.head = t2.employeeid group by departmentid order by count(departmentid) limit 1;"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are names of patients who made an appointment?", "output": "select name from appointment as t1 join patient as t2 on t1.patient = t2.ssn"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the names of patients who have made appointments.", "output": "select name from appointment as t1 join patient as t2 on t1.patient = t2.ssn"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "what are name and phone number of patients who had more than one appointment?", "output": "select name, phone from appointment as t1 join patient as t2 on t1.patient = t2.ssn group by t1.patient having count(*) > 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which patients made more than one appointment? Tell me the name and phone number of these patients.", "output": "select name, phone from appointment as t1 join patient as t2 on t1.patient = t2.ssn group by t1.patient having count(*) > 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the id of the appointment with the most recent start date?", "output": "select appointmentid from appointment order by start desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the id of the appointment that started most recently?", "output": "select appointmentid from appointment order by start desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the name of physicians who took some appointment.", "output": "select t2.name from appointment as t1 join physician as t2 on t1.physician = t2.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the names of all the physicians who took appointments.", "output": "select t2.name from appointment as t1 join physician as t2 on t1.physician = t2.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the name of physicians who never took any appointment.", "output": "select name from physician except select t2.name from appointment as t1 join physician as t2 on t1.physician = t2.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which physicians have never taken any appointment? Find their names.", "output": "select name from physician except select t2.name from appointment as t1 join physician as t2 on t1.physician = t2.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of all physicians and their primary affiliated departments' names.", "output": "select t1.name, t3.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t2.primaryaffiliation = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the name and primarily affiliated department name of each physician?", "output": "select t1.name, t3.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t2.primaryaffiliation = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the name of the patient who made the most recent appointment?", "output": "select t1.name from patient as t1 join appointment as t2 on t1.ssn = t2.patient order by t2.start desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name of the patient who made the appointment with the most recent start date.", "output": "select t1.name from patient as t1 join appointment as t2 on t1.ssn = t2.patient order by t2.start desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many patients stay in room 112?", "output": "select count(patient) from stay where room = 112"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Count the number of patients who stayed in room 112.", "output": "select count(patient) from stay where room = 112"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Dorian. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many patients' prescriptions are made by physician John Dorian?", "output": "select count(t1.ssn) from patient as t1 join prescribes as t2 on t1.ssn = t2.patient join physician as t3 on t2.physician = t3.employeeid where t3.name = \"John Dorian\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Dorian. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the number of patients' prescriptions physician John Dorian made.", "output": "select count(t1.ssn) from patient as t1 join prescribes as t2 on t1.ssn = t2.patient join physician as t3 on t2.physician = t3.employeeid where t3.name = \"John Dorian\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name of medication used on the patient who stays in room 111?", "output": "select t4.name from stay as t1 join patient as t2 on t1.patient = t2.ssn join prescribes as t3 on t3.patient = t2.ssn join medication as t4 on t3.medication = t4.code where room = 111"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the name of the medication used for the patient staying in room 111?", "output": "select t4.name from stay as t1 join patient as t2 on t1.patient = t2.ssn join prescribes as t3 on t3.patient = t2.ssn join medication as t4 on t3.medication = t4.code where room = 111"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the patient who most recently stayed in room 111.", "output": "select patient from stay where room = 111 order by staystart desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the id of the patient who stayed in room 111 most recently?", "output": "select patient from stay where room = 111 order by staystart desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the name of the nurse has the most appointments?", "output": "select t1.name from nurse as t1 join appointment as t2 on t1.employeeid = t2.prepnurse group by t1.employeeid order by count(*) desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name of the nurse who has the largest number of appointments.", "output": "select t1.name from nurse as t1 join appointment as t2 on t1.employeeid = t2.prepnurse group by t1.employeeid order by count(*) desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many patients do each physician take care of? List their names and number of patients they take care of.", "output": "select t1.name, count(*) from physician as t1 join patient as t2 on t1.employeeid = t2.pcp group by t1.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Return the name of each physician and the number of patients he or she treats.", "output": "select t1.name, count(*) from physician as t1 join patient as t2 on t1.employeeid = t2.pcp group by t1.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name of physicians who are in charge of more than one patient.", "output": "select t1.name from physician as t1 join patient as t2 on t1.employeeid = t2.pcp group by t1.employeeid having count(*) > 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which physicians are in charge of more than one patient? Give me their names.", "output": "select t1.name from physician as t1 join patient as t2 on t1.employeeid = t2.pcp group by t1.employeeid having count(*) > 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the number of rooms located on each block floor.", "output": "select count(*), t1.blockfloor from block as t1 join room as t2 on t1.blockfloor = t2.blockfloor and t1.blockcode = t2.blockcode group by t1.blockfloor"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many rooms does each block floor have?", "output": "select count(*), t1.blockfloor from block as t1 join room as t2 on t1.blockfloor = t2.blockfloor and t1.blockcode = t2.blockcode group by t1.blockfloor"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the number of rooms for different block code?", "output": "select count(*), t1.blockcode from block as t1 join room as t2 on t1.blockfloor = t2.blockfloor and t1.blockcode = t2.blockcode group by t1.blockcode"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many rooms are located for each block code?", "output": "select count(*), t1.blockcode from block as t1 join room as t2 on t1.blockfloor = t2.blockfloor and t1.blockcode = t2.blockcode group by t1.blockcode"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the unique block codes that have available rooms?", "output": "select distinct blockcode from room where unavailable = 0"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Tell me the distinct block codes where some rooms are available.", "output": "select distinct blockcode from room where unavailable = 0"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many different types of rooms are there?", "output": "select count(distinct roomtype) from room"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the number of distinct room types available.", "output": "select count(distinct roomtype) from room"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. The name contains values such as Thesisin. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the names of the physicians who prescribe medication Thesisin?", "output": "select distinct t1.name from physician as t1 join prescribes as t2 on t1.employeeid = t2.physician join medication as t3 on t3.code = t2.medication where t3.name = \"Thesisin\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. The name contains values such as Thesisin. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the names of all the physicians who prescribe Thesisin as medication.", "output": "select distinct t1.name from physician as t1 join prescribes as t2 on t1.employeeid = t2.physician join medication as t3 on t3.code = t2.medication where t3.name = \"Thesisin\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name and position of physicians who prescribe some medication whose brand is X?", "output": "select distinct t1.name, t1.position from physician as t1 join prescribes as t2 on t1.employeeid = t2.physician join medication as t3 on t3.code = t2.medication where t3.brand = \"X\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.", "output": "select distinct t1.name, t1.position from physician as t1 join prescribes as t2 on t1.employeeid = t2.physician join medication as t3 on t3.code = t2.medication where t3.brand = \"X\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the number of medications prescribed for each brand.", "output": "select count(*), t1.name from medication as t1 join prescribes as t2 on t1.code = t2.medication group by t1.brand"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many medications are prescribed for each brand?", "output": "select count(*), t1.name from medication as t1 join prescribes as t2 on t1.code = t2.medication group by t1.brand"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name of physicians whose position title contains the word 'senior'.", "output": "select name from physician where position like '%senior%'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the names of the physicians who have 'senior' in their titles.", "output": "select name from physician where position like '%senior%'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the patient who has the most recent undergoing treatment?", "output": "select patient from undergoes order by dateundergoes limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which patient is undergoing the most recent treatment?", "output": "select patient from undergoes order by dateundergoes limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of all patients who have an undergoing treatment and are staying in room 111.", "output": "select distinct t2.name from undergoes as t1 join patient as t2 on t1.patient = t2.ssn join stay as t3 on t1.stay = t3.stayid where t3.room = 111"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the names of patients who are staying in room 111 and have an undergoing treatment?", "output": "select distinct t2.name from undergoes as t1 join patient as t2 on t1.patient = t2.ssn join stay as t3 on t1.stay = t3.stayid where t3.room = 111"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the names of all distinct nurses ordered by alphabetical order?", "output": "select distinct name from nurse order by name"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the alphabetically ordered list of all the distinct names of nurses?", "output": "select distinct name from nurse order by name"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of nurses who are nursing an undergoing treatment.", "output": "select distinct t2.name from undergoes as t1 join nurse as t2 on t1.assistingnurse = t2.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which nurses are in charge of patients undergoing treatments?", "output": "select distinct t2.name from undergoes as t1 join nurse as t2 on t1.assistingnurse = t2.employeeid"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the names of all distinct medications, ordered in an alphabetical order.", "output": "select distinct name from medication order by name"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the alphabetically ordered list of all distinct medications?", "output": "select distinct name from medication order by name"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the names of the physician who prescribed the highest dose?", "output": "select t1.name from physician as t1 join prescribes as t2 on t1.employeeid = t2.physician order by t2.dose desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the physician who prescribed the highest dose. What is his or her name?", "output": "select t1.name from physician as t1 join prescribes as t2 on t1.employeeid = t2.physician order by t2.dose desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the physicians' employee ids together with their primary affiliation departments' ids.", "output": "select physician, department from affiliated_with where primaryaffiliation = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are each physician's employee id and department id primarily affiliated.", "output": "select physician, department from affiliated_with where primaryaffiliation = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the names of departments where some physicians are primarily affiliated with.", "output": "select distinct t2.name from affiliated_with as t1 join department as t2 on t1.department = t2.departmentid where primaryaffiliation = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the names of departments that have primarily affiliated physicians.", "output": "select distinct t2.name from affiliated_with as t1 join department as t2 on t1.department = t2.departmentid where primaryaffiliation = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What nurses are on call with block floor 1 and block code 1? Tell me their names.", "output": "select nurse from on_call where blockfloor = 1 and blockcode = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the ids of the nurses who are on call in block floor 1 and block code 1.", "output": "select nurse from on_call where blockfloor = 1 and blockcode = 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the highest cost, lowest cost and average cost of procedures?", "output": "select max(cost), min(cost), avg(cost) from procedures"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Tell me the highest, lowest, and average cost of procedures.", "output": "select max(cost), min(cost), avg(cost) from procedures"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "List the name and cost of all procedures sorted by the cost from the highest to the lowest.", "output": "select name, cost from procedures order by cost desc"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Sort the list of names and costs of all procedures in the descending order of cost.", "output": "select name, cost from procedures order by cost desc"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the three most expensive procedures.", "output": "select name from procedures order by cost limit 3"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the three most costly procedures?", "output": "select name from procedures order by cost limit 3"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the physicians who are trained in a procedure that costs more than 5000.", "output": "select t1.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t3.cost > 5000"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which physicians are trained in procedures that are more expensive than 5000?", "output": "select t1.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t3.cost > 5000"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the physician who was trained in the most expensive procedure?", "output": "select t1.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment order by t3.cost desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which physician was trained in the procedure that costs the most.", "output": "select t1.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment order by t3.cost desc limit 1"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What is the average cost of procedures that physician John Wen was trained in?", "output": "select avg(t3.cost) from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Compute the mean price of procedures physician John Wen was trained in.", "output": "select avg(t3.cost) from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of procedures which physician John Wen was trained in.", "output": "select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the names of procedures physician John Wen was trained in?", "output": "select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find all procedures which cost more than 1000 or which physician John Wen was trained in.", "output": "select name from procedures where cost > 1000 union select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the procedures that cost more than 1000 or are specialized in by physician John Wen?", "output": "select name from procedures where cost > 1000 union select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of all procedures which cost more than 1000 but which physician John Wen was not trained in?", "output": "select name from procedures where cost > 1000 except select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Among the procedures that cost more than 1000, which were not specialized in by physician John Wen?", "output": "select name from procedures where cost > 1000 except select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of all procedures such that the cost is less than 5000 and physician John Wen was trained in.", "output": "select name from procedures where cost < 5000 intersect select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. The name contains values such as John Wen. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What procedures cost less than 5000 and have John Wen as a trained physician?", "output": "select name from procedures where cost < 5000 intersect select t3.name from physician as t1 join trained_in as t2 on t1.employeeid = t2.physician join procedures as t3 on t3.code = t2.treatment where t1.name = \"John Wen\""}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. The name contains values such as Psychiatry, Surgery. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.", "output": "select t1.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t3.name = 'Surgery' intersect select t1.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t3.name = 'Psychiatry'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. The name contains values such as Psychiatry, Surgery. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.", "output": "select t1.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t3.name = 'Surgery' intersect select t1.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t3.name = 'Psychiatry'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. The name contains values such as Psychiatry, Surgery. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the name of physicians who are affiliated with Surgery or Psychiatry department.", "output": "select t1.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t3.name = 'Surgery' or t3.name = 'Psychiatry'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. The name contains values such as Psychiatry, Surgery. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Which physicians are affiliated with either Surgery or Psychiatry department? Give me their names.", "output": "select t1.name from physician as t1 join affiliated_with as t2 on t1.employeeid = t2.physician join department as t3 on t2.department = t3.departmentid where t3.name = 'Surgery' or t3.name = 'Psychiatry'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. The name contains values such as Procrastin-X. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of patients who are not using the medication of Procrastin-X.", "output": "select name from patient except select t1.name from patient as t1 join prescribes as t2 on t2.patient = t1.ssn join medication as t3 on t2.medication = t3.code where t3.name = 'Procrastin-X'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. The name contains values such as Procrastin-X. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the names of patients who are not taking the medication of Procrastin-X.", "output": "select name from patient except select t1.name from patient as t1 join prescribes as t2 on t2.patient = t1.ssn join medication as t3 on t2.medication = t3.code where t3.name = 'Procrastin-X'"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. The name contains values such as Procrastin-X. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the number of patients who are not using the medication of Procrastin-X.", "output": "select count(*) from patient where ssn not in ( select t1.patient from prescribes as t1 join medication as t2 on t1.medication = t2.code where t2.name = 'Procrastin-X' )"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. The name contains values such as Procrastin-X. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many patients are not using Procrastin-X as medication?", "output": "select count(*) from patient where ssn not in ( select t1.patient from prescribes as t1 join medication as t2 on t1.medication = t2.code where t2.name = 'Procrastin-X' )"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "How many appointments are there?", "output": "select count(*) from appointment"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Count how many appointments have been made in total.", "output": "select count(*) from appointment"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "Find the names of nurses who are on call.", "output": "select distinct t1.name from nurse as t1 join on_call as t2 on t1.employeeid = t2.nurse"}, {"instruction": "hospital_1 contains tables such as physician, department, affiliated_with, procedures, trained_in, patient, nurse, appointment, medication, prescribes, block, room, on_call, stay, undergoes. Table physician has columns such as employeeid, name, position, ssn. employeeid is the primary key. Table department has columns such as departmentid, name, head. departmentid is the primary key. Table affiliated_with has columns such as physician, department, primaryaffiliation. physician is the primary key. Table procedures has columns such as code, name, cost. code is the primary key. Table trained_in has columns such as physician, treatment, certificationdate, certificationexpires. physician is the primary key. Table patient has columns such as ssn, name, address, phone, insuranceid, pcp. ssn is the primary key. Table nurse has columns such as employeeid, name, position, registered, ssn. employeeid is the primary key. The position contains values such as Nurse. Table appointment has columns such as appointmentid, patient, prepnurse, physician, start, end, examinationroom. appointmentid is the primary key. Table medication has columns such as code, name, brand, description. code is the primary key. Table prescribes has columns such as physician, patient, medication, date, appointment, dose. physician is the primary key. Table block has columns such as blockfloor, blockcode. blockfloor is the primary key. Table room has columns such as roomnumber, roomtype, blockfloor, blockcode, unavailable. roomnumber is the primary key. Table on_call has columns such as nurse, blockfloor, blockcode, oncallstart, oncallend. nurse is the primary key. Table stay has columns such as stayid, patient, room, staystart, stayend. stayid is the primary key. Table undergoes has columns such as patient, procedures, stay, dateundergoes, physician, assistingnurse. patient is the primary key. The head of department is the foreign key of employeeid of physician. The department of affiliated_with is the foreign key of departmentid of department. The physician of affiliated_with is the foreign key of employeeid of physician. The treatment of trained_in is the foreign key of code of procedures. The physician of trained_in is the foreign key of employeeid of physician. The pcp of patient is the foreign key of employeeid of physician. The physician of appointment is the foreign key of employeeid of physician. The prepnurse of appointment is the foreign key of employeeid of nurse. The patient of appointment is the foreign key of ssn of patient. The appointment of prescribes is the foreign key of appointmentid of appointment. The medication of prescribes is the foreign key of code of medication. The patient of prescribes is the foreign key of ssn of patient. The physician of prescribes is the foreign key of employeeid of physician. The blockfloor of room is the foreign key of blockfloor of block. The blockcode of room is the foreign key of blockcode of block. The blockfloor of on_call is the foreign key of blockfloor of block. The blockcode of on_call is the foreign key of blockcode of block. The nurse of on_call is the foreign key of employeeid of nurse. The room of stay is the foreign key of roomnumber of room. The patient of stay is the foreign key of ssn of patient. The assistingnurse of undergoes is the foreign key of employeeid of nurse. The physician of undergoes is the foreign key of employeeid of physician. The stay of undergoes is the foreign key of stayid of stay. The procedures of undergoes is the foreign key of code of procedures. The patient of undergoes is the foreign key of ssn of patient.", "input": "What are the distinct names of nurses on call?", "output": "select distinct t1.name from nurse as t1 join on_call as t2 on t1.employeeid = t2.nurse"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "How many ships are there?", "output": "select count(*) from ship"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What is the number of ships?", "output": "select count(*) from ship"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "List the name of ships in ascending order of tonnage.", "output": "select name from ship order by tonnage asc"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "what are the names of the ships ordered by ascending tonnage?", "output": "select name from ship order by tonnage asc"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the type and nationality of ships?", "output": "select type, nationality from ship"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the types and nationalities of every ship?", "output": "select type, nationality from ship"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The nationality contains values such as United States. The ship_id of mission is the foreign key of ship_id of ship.", "input": "List the name of ships whose nationality is not \"United States\".", "output": "select name from ship where nationality != \"United States\""}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The nationality contains values such as United States. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the names of the ships that are not from the United States?", "output": "select name from ship where nationality != \"United States\""}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The nationality contains values such as United Kingdom, United States. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Show the name of ships whose nationality is either United States or United Kingdom.", "output": "select name from ship where nationality = \"United States\" or nationality = \"United Kingdom\""}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the names of the ships that are from either the US or the UK?", "output": "select name from ship where nationality = \"United States\" or nationality = \"United Kingdom\""}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What is the name of the ship with the largest tonnage?", "output": "select name from ship order by tonnage desc limit 1"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What is the ship with the largest amount of tonnage called?", "output": "select name from ship order by tonnage desc limit 1"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Show different types of ships and the number of ships of each type.", "output": "select type, count(*) from ship group by type"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "For each type, how many ships are there?", "output": "select type, count(*) from ship group by type"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Please show the most common type of ships.", "output": "select type from ship group by type order by count(*) desc limit 1"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What is the most common type of ships?", "output": "select type from ship group by type order by count(*) desc limit 1"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "List the nations that have more than two ships.", "output": "select nationality from ship group by nationality having count(*) > 2"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the nations that have more than two ships?", "output": "select nationality from ship group by nationality having count(*) > 2"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Show different types of ships and the average tonnage of ships of each type.", "output": "select type, avg(tonnage) from ship group by type"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "For each type, what is the average tonnage?", "output": "select type, avg(tonnage) from ship group by type"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Show codes and fates of missions, and names of ships involved.", "output": "select t1.code, t1.fate, t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the mission codes, fates, and names of the ships involved?", "output": "select t1.code, t1.fate, t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Show names of ships involved in a mission launched after 1928.", "output": "select t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t1.launched_year > 1928"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the names of ships that were involved in a mission launched after 1928?", "output": "select t2.name from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t1.launched_year > 1928"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The nationality contains values such as United States. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Show the distinct fate of missions that involve ships with nationality \"United States\"", "output": "select distinct t1.fate from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t2.nationality = \"United States\""}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The nationality contains values such as United States. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the different fates of the mission that involved ships from the United States?", "output": "select distinct t1.fate from mission as t1 join ship as t2 on t1.ship_id = t2.ship_id where t2.nationality = \"United States\""}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "List the name of ships that are not involved in any mission", "output": "select name from ship where ship_id not in (select ship_id from mission)"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the names of the ships that are not involved in any missions?", "output": "select name from ship where ship_id not in (select ship_id from mission)"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "Show the types of ships that have both ships with tonnage larger than 6000 and ships with tonnage smaller than 4000.", "output": "select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000"}, {"instruction": "ship_mission contains tables such as mission, ship. Table mission has columns such as mission_id, ship_id, code, launched_year, location, speed_knots, fate. mission_id is the primary key. Table ship has columns such as ship_id, name, type, nationality, tonnage. ship_id is the primary key. The ship_id of mission is the foreign key of ship_id of ship.", "input": "What are the types of the ships that have both shiips with tonnage more than 6000 and those with tonnage less than 4000?", "output": "select type from ship where tonnage > 6000 intersect select type from ship where tonnage < 4000"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the number of students in total.", "output": "select count(*) from list"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "How many students are there?", "output": "select count(*) from list"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the last names of students studying in room 111.", "output": "select lastname from list where classroom = 111"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "What are the last names of students in room 111?", "output": "select lastname from list where classroom = 111"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the first names of students studying in room 108.", "output": "select firstname from list where classroom = 108"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "What are the first names of students in room 108?", "output": "select firstname from list where classroom = 108"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "What are the first names of students studying in room 107?", "output": "select distinct firstname from list where classroom = 107"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "List the first names of all the students in room 107.", "output": "select distinct firstname from list where classroom = 107"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.", "output": "select distinct classroom, grade from list"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "What are the grade number and classroom number of each class in the list?", "output": "select distinct classroom, grade from list"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which grade is studying in classroom 103?", "output": "select distinct grade from list where classroom = 103"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the grade taught in classroom 103.", "output": "select distinct grade from list where classroom = 103"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the grade studying in room 105.", "output": "select distinct grade from list where classroom = 105"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which grade is studying in room 105?", "output": "select distinct grade from list where classroom = 105"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which classrooms are used by grade 4?", "output": "select distinct classroom from list where grade = 4"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the classrooms in which grade 4 is studying.", "output": "select distinct classroom from list where grade = 4"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which classrooms are used by grade 5?", "output": "select distinct classroom from list where grade = 5"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Show me the classrooms grade 5 is using.", "output": "select distinct classroom from list where grade = 5"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the last names of the teachers that teach fifth grade.", "output": "select distinct t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where grade = 5"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "what are the last names of the teachers who teach grade 5?", "output": "select distinct t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where grade = 5"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the first names of the teachers that teach first grade.", "output": "select distinct t2.firstname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where grade = 1"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "What are the first names of the teachers who teach grade 1?", "output": "select distinct t2.firstname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where grade = 1"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the first names of all the teachers that teach in classroom 110.", "output": "select firstname from teachers where classroom = 110"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which teachers teach in classroom 110? Give me their first names.", "output": "select firstname from teachers where classroom = 110"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the last names of teachers teaching in classroom 109.", "output": "select lastname from teachers where classroom = 109"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which teachers teach in classroom 109? Give me their last names.", "output": "select lastname from teachers where classroom = 109"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Report the first name and last name of all the teachers.", "output": "select distinct firstname, lastname from teachers"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "What are the first name and last name of all the teachers?", "output": "select distinct firstname, lastname from teachers"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Report the first name and last name of all the students.", "output": "select distinct firstname, lastname from list"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Show each student's first name and last name.", "output": "select distinct firstname, lastname from list"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as MOYER.The firstname contains values such as OTHA.", "input": "Find all students taught by OTHA MOYER. Output the first and last names of the students.", "output": "select t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"OTHA\" and t2.lastname = \"MOYER\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as MOYER.The firstname contains values such as OTHA.", "input": "Which students study under the teacher named OTHA MOYER? Give me the first and last names of the students.", "output": "select t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"OTHA\" and t2.lastname = \"MOYER\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as MARROTTE.The firstname contains values such as KIRK.", "input": "Find all students taught by MARROTTE KIRK. Output first and last names of students.", "output": "select t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"MARROTTE\" and t2.lastname = \"KIRK\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as MARROTTE.The firstname contains values such as KIRK.", "input": "Which are the first and last names of the students taught by MARROTTE KIRK?", "output": "select t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"MARROTTE\" and t2.lastname = \"KIRK\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as BROMLEY.The firstname contains values such as EVELINA. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the first and last name of all the teachers that teach EVELINA BROMLEY.", "output": "select t2.firstname, t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"EVELINA\" and t1.lastname = \"BROMLEY\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as BROMLEY.The firstname contains values such as EVELINA. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name of the teachers.", "output": "select t2.firstname, t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"EVELINA\" and t1.lastname = \"BROMLEY\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as GELL.The firstname contains values such as TAMI. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the last names of all the teachers that teach GELL TAMI.", "output": "select t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"GELL\" and t1.lastname = \"TAMI\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as GELL.The firstname contains values such as TAMI. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "What are the last names of the teachers who teach the student called GELL TAMI?", "output": "select t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"GELL\" and t1.lastname = \"TAMI\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as ONDERSMA.The firstname contains values such as LORIA.", "input": "How many students does LORIA ONDERSMA teaches?", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"LORIA\" and t2.lastname = \"ONDERSMA\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as ONDERSMA.The firstname contains values such as LORIA.", "input": "Count the number of students the teacher LORIA ONDERSMA teaches.", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"LORIA\" and t2.lastname = \"ONDERSMA\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as KAWA.The firstname contains values such as GORDON.", "input": "How many students does KAWA GORDON teaches?", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"KAWA\" and t2.lastname = \"GORDON\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as KAWA.The firstname contains values such as GORDON.", "input": "Find the number of students taught by the teacher KAWA GORDON.", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"KAWA\" and t2.lastname = \"GORDON\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as TARRING.The firstname contains values such as LEIA.", "input": "Find the number of students taught by TARRING LEIA.", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"TARRING\" and t2.lastname = \"LEIA\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as TARRING.The firstname contains values such as LEIA.", "input": "How many students are taught by teacher TARRING LEIA?", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"TARRING\" and t2.lastname = \"LEIA\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as NABOZNY.The firstname contains values such as CHRISSY. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "How many teachers does the student named CHRISSY NABOZNY have?", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"CHRISSY\" and t1.lastname = \"NABOZNY\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as NABOZNY.The firstname contains values such as CHRISSY. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the number of teachers who teach the student called CHRISSY NABOZNY.", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"CHRISSY\" and t1.lastname = \"NABOZNY\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as MADLOCK.The firstname contains values such as RAY. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "How many teachers does the student named MADLOCK RAY have?", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"MADLOCK\" and t1.lastname = \"RAY\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. The lastname contains values such as MADLOCK.The firstname contains values such as RAY. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the number of teachers who teach the student called MADLOCK RAY.", "output": "select count(*) from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.firstname = \"MADLOCK\" and t1.lastname = \"RAY\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as MOYER.The firstname contains values such as OTHA.", "input": "Find all first-grade students who are NOT taught by OTHA MOYER. Report their first and last names.", "output": "select distinct t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.grade = 1 except select t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"OTHA\" and t2.lastname = \"MOYER\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as MOYER.The firstname contains values such as OTHA.", "input": "What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?", "output": "select distinct t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.grade = 1 except select t1.firstname, t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t2.firstname = \"OTHA\" and t2.lastname = \"MOYER\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as COVIN.The firstname contains values such as JEROME.", "input": "Find the last names of the students in third grade that are not taught by COVIN JEROME.", "output": "select distinct t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.grade = 3 and t2.firstname != \"COVIN\" and t2.lastname != \"JEROME\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key. The lastname contains values such as COVIN.The firstname contains values such as JEROME.", "input": "Which students in third grade are not taught by teacher COVIN JEROME? Give me the last names of the students.", "output": "select distinct t1.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom where t1.grade = 3 and t2.firstname != \"COVIN\" and t2.lastname != \"JEROME\""}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each grade, report the grade, the number of classrooms in which it is taught and the total number of students in the grade.", "output": "select grade, count(distinct classroom), count(*) from list group by grade"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade.", "output": "select grade, count(distinct classroom), count(*) from list group by grade"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each classroom, report the classroom number and the number of grades using it.", "output": "select classroom, count(distinct grade) from list group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each classroom, show the classroom number and count the number of distinct grades that use the room.", "output": "select classroom, count(distinct grade) from list group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which classroom has the most students?", "output": "select classroom from list group by classroom order by count(*) desc limit 1"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the classroom that the most students use.", "output": "select classroom from list group by classroom order by count(*) desc limit 1"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Report the number of students in each classroom.", "output": "select classroom, count(*) from list group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each classroom, show the classroom number and find how many students are using it.", "output": "select classroom, count(*) from list group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each grade 0 classroom, report the total number of students.", "output": "select classroom, count(*) from list where grade = \"0\" group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each grade 0 classroom, return the classroom number and the count of students.", "output": "select classroom, count(*) from list where grade = \"0\" group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Report the total number of students for each fourth-grade classroom.", "output": "select classroom, count(*) from list where grade = \"4\" group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "For each fourth-grade classroom, show the classroom number and the total number of students using it.", "output": "select classroom, count(*) from list where grade = \"4\" group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the name of the teacher who teaches the largest number of students.", "output": "select t2.firstname, t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom group by t2.firstname, t2.lastname order by count(*) desc limit 1"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Which teacher teaches the most students? Give me the first name and last name of the teacher.", "output": "select t2.firstname, t2.lastname from list as t1 join teachers as t2 on t1.classroom = t2.classroom group by t2.firstname, t2.lastname order by count(*) desc limit 1"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "Find the number of students in one classroom.", "output": "select count(*), classroom from list group by classroom"}, {"instruction": "student_1 contains tables such as list, teachers. Table list has columns such as lastname, firstname, grade, classroom. lastname is the primary key. Table teachers has columns such as lastname, firstname, classroom. lastname is the primary key.", "input": "How many students does one classroom have?", "output": "select count(*), classroom from list group by classroom"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "How many companies are headquartered in the US?", "output": "select count(*) from company where headquarters = 'USA'"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "List the names of companies by ascending number of sales.", "output": "select name from company order by sales_in_billion asc"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "What are the headquarters and industries of all companies?", "output": "select headquarters, industry from company"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. The industry contains values such as Banking, Retailing. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the names of companies in the banking or retailing industry?", "output": "select name from company where industry = \"Banking\" or industry = \"Retailing\""}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "What is the maximum and minimum market value of companies?", "output": "select max(market_value_in_billion), min(market_value_in_billion) from company"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "What is the headquarter of the company with the largest sales?", "output": "select headquarters from company order by sales_in_billion desc limit 1"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the different headquarters and number of companies at each headquarter.", "output": "select headquarters, count(*) from company group by headquarters"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the most common headquarter for companies.", "output": "select headquarters from company group by headquarters order by count(*) desc limit 1"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the headquarters that have at least two companies.", "output": "select headquarters from company group by headquarters having count(*) >= 2"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. The industry contains values such as Oil and gas, Banking. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the headquarters that have both companies in banking industry and companies in oil and gas industry.", "output": "select headquarters from company where industry = \"Banking\" intersect select headquarters from company where industry = \"Oil and gas\""}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the names of companies and of employees.", "output": "select t3.name, t2.name from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show names of companies and that of employees in descending order of number of years working for that employee.", "output": "select t3.name, t2.name from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id order by t1.year_working"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the names of employees that work for companies with sales bigger than 200.", "output": "select t2.name from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id where t3.sales_in_billion > 200"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "Show the names of companies and the number of employees they have", "output": "select t3.name, count(*) from employment as t1 join people as t2 on t1.people_id = t2.people_id join company as t3 on t1.company_id = t3.company_id group by t3.name"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "List the names of people that are not employed by any company", "output": "select name from people where people_id not in (select people_id from employment)"}, {"instruction": "company_employee contains tables such as people, company, employment. Table people has columns such as people_id, age, name, nationality, graduation_college. people_id is the primary key. Table company has columns such as company_id, name, headquarters, industry, sales_in_billion, profits_in_billion, assets_in_billion, market_value_in_billion. company_id is the primary key. Table employment has columns such as company_id, people_id, year_working. company_id is the primary key. The people_id of employment is the foreign key of people_id of people. The company_id of employment is the foreign key of company_id of company.", "input": "list the names of the companies with more than 200 sales in the descending order of sales and profits.", "output": "select name from company where sales_in_billion > 200 order by sales_in_billion, profits_in_billion desc"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "How many film are there?", "output": "select count(*) from film"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Count the number of films.", "output": "select count(*) from film"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List the distinct director of all films.", "output": "select distinct director from film"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the different film Directors?", "output": "select distinct director from film"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What is the average ticket sales gross in dollars of films?", "output": "select avg(gross_in_dollar) from film"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Return the average gross sales in dollars across all films.", "output": "select avg(gross_in_dollar) from film"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the low and high estimates of film markets?", "output": "select low_estimate, high_estimate from film_market_estimation"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Return the low and high estimates for all film markets.", "output": "select low_estimate, high_estimate from film_market_estimation"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the types of film market estimations in year 1995?", "output": "select type from film_market_estimation where year = 1995"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Return the types of film market estimations in 1995.", "output": "select type from film_market_estimation where year = 1995"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the maximum and minimum number of cities in all markets.", "output": "select max(number_cities), min(number_cities) from market"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Return the maximum and minimum number of cities across all markets.", "output": "select max(number_cities), min(number_cities) from market"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "How many markets have number of cities smaller than 300?", "output": "select count(*) from market where number_cities < 300"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Count the number of markets that have a number of cities lower than 300.", "output": "select count(*) from market where number_cities < 300"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List all countries of markets in ascending alphabetical order.", "output": "select country from market order by country asc"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the countries for each market, ordered alphabetically?", "output": "select country from market order by country asc"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List all countries of markets in descending order of number of cities.", "output": "select country from market order by number_cities desc"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the countries for each market ordered by decreasing number of cities?", "output": "select country from market order by number_cities desc"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Please show the titles of films and the types of market estimations.", "output": "select t1.title, t2.type from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the titles of films and corresponding types of market estimations?", "output": "select t1.title, t2.type from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Show the distinct director of films with market estimation in the year of 1995.", "output": "select distinct t1.director from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id where t2.year = 1995"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Who are the different directors of films which had market estimation in 1995?", "output": "select distinct t1.director from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id where t2.year = 1995"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What is the average number of cities of markets with low film market estimate bigger than 10000?", "output": "select avg(t2.number_cities) from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t1.low_estimate > 10000"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Give the average number of cities within markets that had a low market estimation larger than 10000?", "output": "select avg(t2.number_cities) from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t1.low_estimate > 10000"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Please list the countries and years of film market estimations.", "output": "select t2.country, t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the countries of markets and their corresponding years of market estimation?", "output": "select t2.country, t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. The country contains values such as Japan. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Please list the years of film market estimations when the market is in country \"Japan\" in descending order.", "output": "select t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t2.country = \"Japan\" order by t1.year desc"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. The country contains values such as Japan. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the years of film market estimation for the market of Japan, ordered by year descending?", "output": "select t1.year from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where t2.country = \"Japan\" order by t1.year desc"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List the studios of each film and the number of films produced by that studio.", "output": "select studio, count(*) from film group by studio"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "How films are produced by each studio?", "output": "select studio, count(*) from film group by studio"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List the name of film studio that have the most number of films.", "output": "select studio from film group by studio order by count(*) desc limit 1"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What is the name of teh studio that created the most films?", "output": "select studio from film group by studio order by count(*) desc limit 1"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List the names of studios that have at least two films.", "output": "select studio from film group by studio having count(*) >= 2"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the names of studios that have made two or more films?", "output": "select studio from film group by studio having count(*) >= 2"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List the title of films that do not have any market estimation.", "output": "select title from film where film_id not in (select film_id from film_market_estimation)"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the titles of films that do not have a film market estimation?", "output": "select title from film where film_id not in (select film_id from film_market_estimation)"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. The director contains values such as Nicholas Meyer, Walter Hill. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Show the studios that have produced films with director \"Nicholas Meyer\" and \"Walter Hill\".", "output": "select studio from film where director = \"Nicholas Meyer\" intersect select studio from film where director = \"Walter Hill\""}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. The director contains values such as Nicholas Meyer, Walter Hill. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the names of studios that have produced films with both Nicholas Meyer and Walter Hill?", "output": "select studio from film where director = \"Nicholas Meyer\" intersect select studio from film where director = \"Walter Hill\""}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. The studio contains values such as Universal. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Find the titles and studios of the films that are produced by some film studios that contained the word \"Universal\".", "output": "select title, studio from film where studio like \"%universal%\""}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. The studio contains values such as Universal. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the titles and studios of films that have been produced by a studio whose name contains \"Universal\"?", "output": "select title, studio from film where studio like \"%universal%\""}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. The director contains values such as Walter Hill. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Show the studios that have not produced films with director \"Walter Hill\".", "output": "select studio from film except select studio from film where director = \"Walter Hill\""}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. The director contains values such as Walter Hill. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Which studios have never worked with the director Walter Hill?", "output": "select studio from film except select studio from film where director = \"Walter Hill\""}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "List the studios which average gross is above 4500000.", "output": "select studio from film group by studio having avg(gross_in_dollar) >= 4500000"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Which studios have an average gross of over 4500000?", "output": "select studio from film group by studio having avg(gross_in_dollar) >= 4500000"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What is the title of the film that has the highest high market estimation.", "output": "select t1.title from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id order by high_estimate desc limit 1"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Return the title of the film with the highest high estimate?", "output": "select t1.title from film as t1 join film_market_estimation as t2 on t1.film_id = t2.film_id order by high_estimate desc limit 1"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. The country contains values such as China. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "What are the titles and directors of the films were never presented in China?", "output": "select title, director from film where film_id not in (select film_id from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where country = 'China')"}, {"instruction": "film_rank contains tables such as film, market, film_market_estimation. Table film has columns such as film_id, title, studio, director, gross_in_dollar. film_id is the primary key. Table market has columns such as market_id, country, number_cities. market_id is the primary key. The country contains values such as China. Table film_market_estimation has columns such as estimation_id, low_estimate, high_estimate, film_id, type, market_id, year. estimation_id is the primary key. The market_id of film_market_estimation is the foreign key of market_id of market. The film_id of film_market_estimation is the foreign key of film_id of film.", "input": "Return the titles and directors of films that were never in the market of China.", "output": "select title, director from film where film_id not in (select film_id from film_market_estimation as t1 join market as t2 on t1.market_id = t2.market_id where country = 'China')"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "How many calendar items do we have?", "output": "select count(*) from ref_calendar"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Count the number of all the calendar items.", "output": "select count(*) from ref_calendar"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show all calendar dates and day Numbers.", "output": "select calendar_date, day_number from ref_calendar"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are all the calendar dates and day Numbers?", "output": "select calendar_date, day_number from ref_calendar"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the number of document types.", "output": "select count(*) from ref_document_types"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "How many document types are there?", "output": "select count(*) from ref_document_types"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "List all document type codes and document type names.", "output": "select document_type_code, document_type_name from ref_document_types"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are all the document type codes and document type names?", "output": "select document_type_code, document_type_name from ref_document_types"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as RV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as RV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the name and description for document type code RV?", "output": "select document_type_name, document_type_description from ref_document_types where document_type_code = \"RV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as RV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as RV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Give me the name and description of the document type code RV.", "output": "select document_type_name, document_type_description from ref_document_types where document_type_code = \"RV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Paper. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the document type code for document type \"Paper\"?", "output": "select document_type_code from ref_document_types where document_type_name = \"Paper\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Paper. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the code of the document type \"Paper\".", "output": "select document_type_code from ref_document_types where document_type_name = \"Paper\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV, BK.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV, BK. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the number of documents with document type code CV or BK.", "output": "select count(*) from all_documents where document_type_code = \"CV\" or document_type_code = \"BK\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV, BK.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV, BK. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "How many documents have document type code CV or BK?", "output": "select count(*) from all_documents where document_type_code = \"CV\" or document_type_code = \"BK\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Marry CV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the date when the document \"Marry CV\" was stored?", "output": "select date_stored from all_documents where document_name = \"Marry CV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Marry CV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "When was the document named \"Marry CV\" stored? Give me the date.", "output": "select date_stored from all_documents where document_name = \"Marry CV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the day Number and date of all the documents?", "output": "select t2.day_number, t1.date_stored from all_documents as t1 join ref_calendar as t2 on t1.date_stored = t2.calendar_date"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Return the day Number and stored date for all the documents.", "output": "select t2.day_number, t1.date_stored from all_documents as t1 join ref_calendar as t2 on t1.date_stored = t2.calendar_date"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Book. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_name contains values such as How to read a book. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the document type name for the document with name \"How to read a book\"?", "output": "select t2.document_type_name from all_documents as t1 join ref_document_types as t2 on t1.document_type_code = t2.document_type_code where t1.document_name = \"How to read a book\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Book. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_name contains values such as How to read a book. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the document type name of the document named \"How to read a book\".", "output": "select t2.document_type_name from all_documents as t1 join ref_document_types as t2 on t1.document_type_code = t2.document_type_code where t1.document_name = \"How to read a book\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the number of locations.", "output": "select count(*) from ref_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "How many locations are listed in the database?", "output": "select count(*) from ref_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "List all location codes and location names.", "output": "select location_code, location_name from ref_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are all the location codes and location names?", "output": "select location_code, location_name from ref_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the name and description for location code x?", "output": "select location_name, location_description from ref_locations where location_code = \"x\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Give me the name and description of the location with code x.", "output": "select location_name, location_description from ref_locations where location_code = \"x\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. The location_name contains values such as Canada. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the location code for the country \"Canada\"?", "output": "select location_code from ref_locations where location_name = \"Canada\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. The location_name contains values such as Canada. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the location code of the country \"Canada\".", "output": "select location_code from ref_locations where location_name = \"Canada\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "How many roles are there?", "output": "select count(*) from roles"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Count the total number of roles listed.", "output": "select count(*) from roles"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "List all role codes, role names, and role descriptions.", "output": "select role_code, role_name, role_description from roles"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are all the role codes, role names, and role descriptions?", "output": "select role_code, role_name, role_description from roles"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_code contains values such as MG. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The role_code contains values such as MG. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the name and description for role code \"MG\"?", "output": "select role_name, role_description from roles where role_code = \"MG\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_code contains values such as MG. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The role_code contains values such as MG. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the name and description of the role with code \"MG\".", "output": "select role_name, role_description from roles where role_code = \"MG\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_name contains values such as Proof Reader. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the description for role name \"Proof Reader\".", "output": "select role_description from roles where role_name = \"Proof Reader\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_name contains values such as Proof Reader. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the description of the role named \"Proof Reader\"?", "output": "select role_description from roles where role_name = \"Proof Reader\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "How many employees do we have?", "output": "select count(*) from employees"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the number of employees we have.", "output": "select count(*) from employees"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The employee_name contains values such as Armani. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the name, role code, and date of birth for the employee with name 'Armani'.", "output": "select employee_name, role_code, date_of_birth from employees where employee_name = 'Armani'"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The employee_name contains values such as Armani. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the name, role code, and date of birth of the employee named 'Armani'?", "output": "select employee_name, role_code, date_of_birth from employees where employee_name = 'Armani'"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The employee_name contains values such as Ebba. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the id for the employee called Ebba?", "output": "select employee_id from employees where employee_name = \"Ebba\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The employee_name contains values such as Ebba. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the id of the employee named Ebba.", "output": "select employee_id from employees where employee_name = \"Ebba\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_code contains values such as HR. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The role_code contains values such as HR. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the names of all the employees with role \"HR\".", "output": "select employee_name from employees where role_code = \"HR\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_code contains values such as HR. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The role_code contains values such as HR. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Which employees have the role with code \"HR\"? Find their names.", "output": "select employee_name from employees where role_code = \"HR\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show all role codes and the number of employees in each role.", "output": "select role_code, count(*) from employees group by role_code"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the code of each role and the number of employees in each role?", "output": "select role_code, count(*) from employees group by role_code"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the role code with the largest number of employees?", "output": "select role_code from employees group by role_code order by count(*) desc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the code of the role that have the most employees.", "output": "select role_code from employees group by role_code order by count(*) desc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show all role codes with at least 3 employees.", "output": "select role_code from employees group by role_code having count(*) >= 3"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the roles with three or more employees? Give me the role codes.", "output": "select role_code from employees group by role_code having count(*) >= 3"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the role code with the least employees.", "output": "select role_code from employees group by role_code order by count(*) asc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the role with the smallest number of employees? Find the role codes.", "output": "select role_code from employees group by role_code order by count(*) asc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The employee_name contains values such as Ebba. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the role name and role description for employee called Ebba?", "output": "select t2.role_name, t2.role_description from employees as t1 join roles as t2 on t1.role_code = t2.role_code where t1.employee_name = \"Ebba\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. The employee_name contains values such as Ebba. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the name and description of the role played by the employee named Ebba.", "output": "select t2.role_name, t2.role_description from employees as t1 join roles as t2 on t1.role_code = t2.role_code where t1.employee_name = \"Ebba\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_name contains values such as Editor. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the names of employees with role name Editor.", "output": "select t1.employee_name from employees as t1 join roles as t2 on t1.role_code = t2.role_code where t2.role_name = \"Editor\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_name contains values such as Editor. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the names of all the employees whose the role name is \"Editor\".", "output": "select t1.employee_name from employees as t1 join roles as t2 on t1.role_code = t2.role_code where t2.role_name = \"Editor\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_name contains values such as Human Resource, Manager. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the employee ids for all employees with role name \"Human Resource\" or \"Manager\".", "output": "select t1.employee_id from employees as t1 join roles as t2 on t1.role_code = t2.role_code where t2.role_name = \"Human Resource\" or t2.role_name = \"Manager\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. The role_name contains values such as Human Resource, Manager. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the employee ids of the employees whose role name is \"Human Resource\" or \"Manager\"?", "output": "select t1.employee_id from employees as t1 join roles as t2 on t1.role_code = t2.role_code where t2.role_name = \"Human Resource\" or t2.role_name = \"Manager\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the different location codes for documents?", "output": "select distinct location_code from document_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Give me all the distinct location codes for documents.", "output": "select distinct location_code from document_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Robin CV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the location name for document \"Robin CV\".", "output": "select t3.location_name from all_documents as t1 join document_locations as t2 on t1.document_id = t2.document_id join ref_locations as t3 on t2.location_code = t3.location_code where t1.document_name = \"Robin CV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Robin CV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the location name of the document \"Robin CV\"?", "output": "select t3.location_name from all_documents as t1 join document_locations as t2 on t1.document_id = t2.document_id join ref_locations as t3 on t2.location_code = t3.location_code where t1.document_name = \"Robin CV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the location code, the starting date and ending data in that location for all the documents.", "output": "select location_code, date_in_location_from, date_in_locaton_to from document_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are each document's location code, and starting date and ending data in that location?", "output": "select location_code, date_in_location_from, date_in_locaton_to from document_locations"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Robin CV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is \"the date in location from\" and \"the date in location to\" for the document with name \"Robin CV\"?", "output": "select t1.date_in_location_from, t1.date_in_locaton_to from document_locations as t1 join all_documents as t2 on t1.document_id = t2.document_id where t2.document_name = \"Robin CV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Robin CV. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the starting date and ending data in location for the document named \"Robin CV\".", "output": "select t1.date_in_location_from, t1.date_in_locaton_to from document_locations as t1 join all_documents as t2 on t1.document_id = t2.document_id where t2.document_name = \"Robin CV\""}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the location codes and the number of documents in each location.", "output": "select location_code, count(*) from document_locations group by location_code"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the code of each location and the number of documents in that location?", "output": "select location_code, count(*) from document_locations group by location_code"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What is the location code with the most documents?", "output": "select location_code from document_locations group by location_code order by count(*) desc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Find the code of the location with the largest number of documents.", "output": "select location_code from document_locations group by location_code order by count(*) desc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the location codes with at least 3 documents.", "output": "select location_code from document_locations group by location_code having count(*) >= 3"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the codes of the locations with at least three documents?", "output": "select location_code from document_locations group by location_code having count(*) >= 3"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the location name and code with the least documents.", "output": "select t2.location_name, t1.location_code from document_locations as t1 join ref_locations as t2 on t1.location_code = t2.location_code group by t1.location_code order by count(*) asc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the name and code of the location with the smallest number of documents?", "output": "select t2.location_name, t1.location_code from document_locations as t1 join ref_locations as t2 on t1.location_code = t2.location_code group by t1.location_code order by count(*) asc limit 1"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the names of the employees who authorised the destruction and the employees who destroyed the corresponding documents?", "output": "select t2.employee_name, t3.employee_name from documents_to_be_destroyed as t1 join employees as t2 on t1.destruction_authorised_by_employee_id = t2.employee_id join employees as t3 on t1.destroyed_by_employee_id = t3.employee_id;"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "List the names of the employees who authorized the destruction of documents and the employees who destroyed the corresponding documents.", "output": "select t2.employee_name, t3.employee_name from documents_to_be_destroyed as t1 join employees as t2 on t1.destruction_authorised_by_employee_id = t2.employee_id join employees as t3 on t1.destroyed_by_employee_id = t3.employee_id;"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the id of each employee and the number of document destruction authorised by that employee.", "output": "select destruction_authorised_by_employee_id, count(*) from documents_to_be_destroyed group by destruction_authorised_by_employee_id"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the id of each employee and the number of document destruction authorised by that employee?", "output": "select destruction_authorised_by_employee_id, count(*) from documents_to_be_destroyed group by destruction_authorised_by_employee_id"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the employee ids and the number of documents destroyed by each employee.", "output": "select destroyed_by_employee_id, count(*) from documents_to_be_destroyed group by destroyed_by_employee_id"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the id of each employee and the number of document destroyed by that employee?", "output": "select destroyed_by_employee_id, count(*) from documents_to_be_destroyed group by destroyed_by_employee_id"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the ids of the employees who don't authorize destruction for any document.", "output": "select employee_id from employees except select destruction_authorised_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Which employees do not authorize destruction for any document? Give me their employee ids.", "output": "select employee_id from employees except select destruction_authorised_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the ids of all employees who have authorized destruction.", "output": "select distinct destruction_authorised_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the ids of all the employees who authorize document destruction?", "output": "select distinct destruction_authorised_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the ids of all employees who have destroyed a document.", "output": "select distinct destroyed_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "What are the ids of all the employees who have destroyed documents?", "output": "select distinct destroyed_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the ids of all employees who don't destroy any document.", "output": "select employee_id from employees except select destroyed_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Which employees do not destroy any document? Find their employee ids.", "output": "select employee_id from employees except select destroyed_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Show the ids of all employees who have either destroyed a document or made an authorization to do this.", "output": "select destroyed_by_employee_id from documents_to_be_destroyed union select destruction_authorised_by_employee_id from documents_to_be_destroyed"}, {"instruction": "cre_Doc_Tracking_DB contains tables such as ref_document_types, ref_calendar, ref_locations, roles, all_documents, employees, document_locations, documents_to_be_destroyed. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_calendar has columns such as calendar_date, day_number. calendar_date is the primary key. Table ref_locations has columns such as location_code, location_name, location_description. location_code is the primary key. Table roles has columns such as role_code, role_name, role_description. role_code is the primary key. Table all_documents has columns such as document_id, date_stored, document_type_code, document_name, document_description, other_details. document_id is the primary key. Table employees has columns such as employee_id, role_code, employee_name, gender_mfu, date_of_birth, other_details. employee_id is the primary key. Table document_locations has columns such as document_id, location_code, date_in_location_from, date_in_locaton_to. document_id is the primary key. Table documents_to_be_destroyed has columns such as document_id, destruction_authorised_by_employee_id, destroyed_by_employee_id, planned_destruction_date, actual_destruction_date, other_details. document_id is the primary key. The date_stored of all_documents is the foreign key of calendar_date of ref_calendar. The document_type_code of all_documents is the foreign key of document_type_code of ref_document_types. The role_code of employees is the foreign key of role_code of roles. The document_id of document_locations is the foreign key of document_id of all_documents. The date_in_locaton_to of document_locations is the foreign key of calendar_date of ref_calendar. The date_in_location_from of document_locations is the foreign key of calendar_date of ref_calendar. The location_code of document_locations is the foreign key of location_code of ref_locations. The document_id of documents_to_be_destroyed is the foreign key of document_id of all_documents. The actual_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The planned_destruction_date of documents_to_be_destroyed is the foreign key of calendar_date of ref_calendar. The destruction_authorised_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees. The destroyed_by_employee_id of documents_to_be_destroyed is the foreign key of employee_id of employees.", "input": "Which employees have either destroyed a document or made an authorization to do so? Return their employee ids.", "output": "select destroyed_by_employee_id from documents_to_be_destroyed union select destruction_authorised_by_employee_id from documents_to_be_destroyed"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many clubs are there?", "output": "select count(*) from club"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the total number of clubs.", "output": "select count(*) from club"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What are the names of all clubs?", "output": "select clubname from club"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Give me the name of each club.", "output": "select clubname from club"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many students are there?", "output": "select count(*) from student"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the total number of students.", "output": "select count(*) from student"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What are the first names of all the students?", "output": "select distinct fname from student"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find each student's first name.", "output": "select distinct fname from student"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the last names of the members of the club \"Bootup Baltimore\".", "output": "select t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Who are the members of the club named \"Bootup Baltimore\"? Give me their last names.", "output": "select t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Who are the members of the club named \"Hopkins Student Enterprises\"? Show the last name.", "output": "select t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Return the last name for the members of the club named \"Hopkins Student Enterprises\".", "output": "select t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many members does the club \"Tennis Club\" has?", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Tennis Club\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the members of the club \"Tennis Club\".", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Tennis Club\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Pen and Paper Gaming. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the number of members of club \"Pen and Paper Gaming\".", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Pen and paper Gaming\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Pen and Paper Gaming. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many people have membership in the club \"Pen and Paper Gaming\"?", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Pen and paper Gaming\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many clubs does \"Linda Smith\" belong to?", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Linda\" and t3.lname = \"Smith\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many clubs does \"Linda Smith\" have membership for?", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Linda\" and t3.lname = \"Smith\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Kim.The fname contains values such as Tracy. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the number of clubs where \"Tracy Kim\" is a member.", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Tracy\" and t3.lname = \"Kim\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Kim.The fname contains values such as Tracy. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "For how many clubs is \"Tracy Kim\" a member?", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Tracy\" and t3.lname = \"Kim\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find all the female members of club \"Bootup Baltimore\". Show the first name and last name.", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.sex = \"F\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Give me the first name and last name for all the female members of the club \"Bootup Baltimore\".", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.sex = \"F\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find all the male members of club \"Hopkins Student Enterprises\". Show the first name and last name.", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\" and t3.sex = \"M\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What are the first name and last name of each male member in club \"Hopkins Student Enterprises\"?", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\" and t3.sex = \"M\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find all members of \"Bootup Baltimore\" whose major is \"600\". Show the first name and last name.", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.major = \"600\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Which members of \"Bootup Baltimore\" major in \"600\"? Give me their first names and last names.", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.major = \"600\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Which club has the most members majoring in \"600\"?", "output": "select t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.major = \"600\" group by t1.clubname order by count(*) desc limit 1"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the club which has the largest number of members majoring in \"600\".", "output": "select t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.major = \"600\" group by t1.clubname order by count(*) desc limit 1"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the name of the club that has the most female students.", "output": "select t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.sex = \"F\" group by t1.clubname order by count(*) desc limit 1"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Which club has the most female students as their members? Give me the name of the club.", "output": "select t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.sex = \"F\" group by t1.clubname order by count(*) desc limit 1"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What is the description of the club named \"Tennis Club\"?", "output": "select clubdesc from club where clubname = \"Tennis Club\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the description of the club called \"Tennis Club\".", "output": "select clubdesc from club where clubname = \"Tennis Club\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Pen and Paper Gaming. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the description of the club \"Pen and Paper Gaming\".", "output": "select clubdesc from club where clubname = \"Pen and paper Gaming\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Pen and Paper Gaming. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What is the description of the club \"Pen and Paper Gaming\"?", "output": "select clubdesc from club where clubname = \"Pen and paper Gaming\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What is the location of the club named \"Tennis Club\"?", "output": "select clublocation from club where clubname = \"Tennis Club\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Where us the club named \"Tennis Club\" located?", "output": "select clublocation from club where clubname = \"Tennis Club\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Pen and Paper Gaming. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the location of the club \"Pen and Paper Gaming\".", "output": "select clublocation from club where clubname = \"Pen and paper Gaming\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Pen and Paper Gaming. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Where is the club \"Pen and Paper Gaming\" located?", "output": "select clublocation from club where clubname = \"Pen and paper Gaming\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Where is the club \"Hopkins Student Enterprises\" located?", "output": "select clublocation from club where clubname = \"Hopkins student Enterprises\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Tell me the location of the club \"Hopkins Student Enterprises\".", "output": "select clublocation from club where clubname = \"Hopkins student Enterprises\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clublocation contains values such as AKW. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the name of all the clubs at \"AKW\".", "output": "select clubname from club where clublocation = \"AKW\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clublocation contains values such as AKW. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Which clubs are located at \"AKW\"? Return the club names.", "output": "select clubname from club where clublocation = \"AKW\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clublocation contains values such as HHH. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many clubs are located at \"HHH\"?", "output": "select count(*) from club where clublocation = \"HHH\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clublocation contains values such as HHH. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the number of clubs located at \"HHH\".", "output": "select count(*) from club where clublocation = \"HHH\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The position contains values such as President. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What are the first and last name of the president of the club \"Bootup Baltimore\"?", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t2.position = \"President\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The position contains values such as President. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Who is the president of the club \"Bootup Baltimore\"? Give me the first and last name.", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t2.position = \"President\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The position contains values such as CTO. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Who is the \"CTO\" of club \"Hopkins Student Enterprises\"? Show the first name and last name.", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\" and t2.position = \"CTO\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The position contains values such as CTO. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the first name and last name for the \"CTO\" of the club \"Hopkins Student Enterprises\"?", "output": "select t3.fname, t3.lname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\" and t2.position = \"CTO\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many different roles are there in the club \"Bootup Baltimore\"?", "output": "select count(distinct t2.position) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid where t1.clubname = \"Bootup Baltimore\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the number of different positions in the club \"Bootup Baltimore\".", "output": "select count(distinct t2.position) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid where t1.clubname = \"Bootup Baltimore\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many members of \"Bootup Baltimore\" are older than 18?", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.age > 18"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the number of members in club \"Bootup Baltimore\" whose age is above 18.", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.age > 18"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many members of club \"Bootup Baltimore\" are younger than 18?", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.age < 18"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the number of members in club \"Bootup Baltimore\" whose age is below 18.", "output": "select count(*) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\" and t3.age < 18"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as BAL. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the names of all the clubs that have at least a member from the city with city code \"BAL\".", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = \"BAL\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as BAL. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Which clubs have one or more members from the city with code \"BAL\"? Give me the names of the clubs.", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = \"BAL\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as HOU. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the names of the clubs that have at least a member from the city with city code \"HOU\".", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = \"HOU\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as HOU. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Which clubs have one or more members from the city with code \"HOU\"? Give me the names of the clubs.", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.city_code = \"HOU\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Tai.The fname contains values such as Eric. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "How many clubs does the student named \"Eric Tai\" belong to?", "output": "select count(distinct t1.clubname) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Eric\" and t3.lname = \"Tai\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Tai.The fname contains values such as Eric. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Count the number of clubs for which the student named \"Eric Tai\" is a member.", "output": "select count(distinct t1.clubname) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Eric\" and t3.lname = \"Tai\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Davis.The fname contains values such as Steven. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "List the clubs having \"Davis Steven\" as a member.", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Davis\" and t3.lname = \"Steven\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Davis.The fname contains values such as Steven. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What are the names of the clubs that have \"Davis Steven\" as a member?", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.fname = \"Davis\" and t3.lname = \"Steven\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "List the clubs that have at least a member with advisor \"1121\".", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.advisor = 1121"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Which clubs have one or more members whose advisor is \"1121\"?", "output": "select distinct t1.clubname from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t3.advisor = 1121"}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "What is the average age of the members of the club \"Bootup Baltimore\"?", "output": "select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Bootup Baltimore. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the average age of the members in the club \"Bootup Baltimore\".", "output": "select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Bootup Baltimore\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Find the average age of members of the club \"Hopkins Student Enterprises\".", "output": "select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Hopkins Student Enterprises. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "On average, how old are the members in the club \"Hopkins Student Enterprises\"?", "output": "select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Hopkins student Enterprises\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Retrieve the average age of members of the club \"Tennis Club\".", "output": "select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Tennis Club\""}, {"instruction": "club_1 contains tables such as student, club, member_of_club. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table club has columns such as clubid, clubname, clubdesc, clublocation. clubid is the primary key. The clubname contains values such as Tennis Club. Table member_of_club has columns such as stuid, clubid, position. is the primary key. The clubid of member_of_club is the foreign key of clubid of club. The stuid of member_of_club is the foreign key of stuid of student.", "input": "Compute the average age of the members in the club \"Tennis Club\".", "output": "select avg(t3.age) from club as t1 join member_of_club as t2 on t1.clubid = t2.clubid join student as t3 on t2.stuid = t3.stuid where t1.clubname = \"Tennis Club\""}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. The grant_start_date contains values such as 1986-08-26 20:49:27.The grant_end_date contains values such as 1989-03-16 18:27:16. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?", "output": "select t1.grant_amount from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id where t2.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. The grant_start_date contains values such as 1986-08-26 20:49:27.The grant_end_date contains values such as 1989-03-16 18:27:16. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'?", "output": "select t1.grant_amount from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id where t2.sent_date < '1986-08-26 20:49:27' intersect select grant_amount from grants where grant_end_date > '1989-03-16 18:27:16'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. The outcome_code contains values such as Patent, Paper. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. The outcome_code contains values such as Patent, Paper. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List the project details of the project both producing patent and paper as outcomes.", "output": "select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'Paper' intersect select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'Patent'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. The outcome_code contains values such as Patent, Paper. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. The outcome_code contains values such as Patent, Paper. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the details of the project that is producing both patents and papers as outcomes?", "output": "select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'Paper' intersect select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id where t2.outcome_code = 'Patent'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the total grant amount of the organisations described as research?", "output": "select sum(grant_amount) from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id join organisation_types as t3 on t2.organisation_type = t3.organisation_type where t3.organisation_type_description = 'Research'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the total amount of grant money for research?", "output": "select sum(grant_amount) from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id join organisation_types as t3 on t2.organisation_type = t3.organisation_type where t3.organisation_type_description = 'Research'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List from which date and to which date these staff work: project staff of the project which hires the most staffs", "output": "select date_from, date_to from project_staff where project_id in( select project_id from project_staff group by project_id order by count(*) desc limit 1 ) union select date_from, date_to from project_staff where role_code = 'leader'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as leader. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as leader. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?", "output": "select date_from, date_to from project_staff where project_id in( select project_id from project_staff group by project_id order by count(*) desc limit 1 ) union select date_from, date_to from project_staff where role_code = 'leader'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Find the organisation ids and details of the organisations which are involved in", "output": "select t2.organisation_id, t2.organisation_details from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) > 6000"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the ids and details for all organizations that have grants of more than 6000 dollars?", "output": "select t2.organisation_id, t2.organisation_details from grants as t1 join organisations as t2 on t1.organisation_id = t2.organisation_id group by t2.organisation_id having sum(t1.grant_amount) > 6000"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the organisation type and id of the organisation which has the most number of research staff?", "output": "select t1.organisation_type, t1.organisation_id from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the type and id of the organization that has the most research staff?", "output": "select t1.organisation_type, t1.organisation_id from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Which organisation type hires most research staff?", "output": "select t1.organisation_type from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_type order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the type of the organization with the most research staff?", "output": "select t1.organisation_type from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_type order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. The project_details contains values such as sed. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described", "output": "select t1.sent_date from documents as t1 join grants as t2 on t1.grant_id = t2.grant_id join organisations as t3 on t2.organisation_id = t3.organisation_id join organisation_types as t4 on t3.organisation_type = t4.organisation_type where t2.grant_amount > 5000 and t4.organisation_type_description = 'Research'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. The project_details contains values such as sed. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the send dates for all documents that have a grant amount of more than 5000 and are involved in research?", "output": "select t1.sent_date from documents as t1 join grants as t2 on t1.grant_id = t2.grant_id join organisations as t3 on t2.organisation_id = t3.organisation_id join organisation_types as t4 on t3.organisation_type = t4.organisation_type where t2.grant_amount > 5000 and t4.organisation_type_description = 'Research'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. The document_description contains values such as Regular. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the response received dates for the documents described as 'Regular' or granted with more than 100?", "output": "select t1.response_received_date from documents as t1 join document_types as t2 on t1.document_type_code = t2.document_type_code join grants as t3 on t1.grant_id = t3.grant_id where t2.document_description = 'Regular' or t3.grant_amount > 100"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. The document_description contains values such as Regular. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the response received date for the document described as Regular that was granted more than 100 dollars?", "output": "select t1.response_received_date from documents as t1 join document_types as t2 on t1.document_type_code = t2.document_type_code join grants as t3 on t1.grant_id = t3.grant_id where t2.document_description = 'Regular' or t3.grant_amount > 100"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List the project details of the projects which did not hire any staff for a researcher role.", "output": "select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the details for all projects that did not hire any staff in a research role?", "output": "select project_details from projects where project_id not in ( select project_id from project_staff where role_code = 'researcher' )"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. The project_details contains values such as omnis. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the task details, task id and project id for the projects which are detailed as 'omnis' or have more than 2 outcomes?", "output": "select t1.task_details, t1.task_id, t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'omnis' union select t1.task_details, t1.task_id, t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.project_id having count(*) > 2"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. The project_details contains values such as omnis. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the task details, task ids, and project ids for the progrects that are detailed as 'omnis' or have at least 3 outcomes?", "output": "select t1.task_details, t1.task_id, t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'omnis' union select t1.task_details, t1.task_id, t2.project_id from tasks as t1 join projects as t2 on t1.project_id = t2.project_id join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.project_id having count(*) > 2"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "When do all the researcher role staff start to work, and when do they stop working?", "output": "select date_from, date_to from project_staff where role_code = 'researcher'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "When did researchers start and stop working?", "output": "select date_from, date_to from project_staff where role_code = 'researcher'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many kinds of roles are there for the staff?", "output": "select count(distinct role_code) from project_staff"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many different roles are there on the project staff?", "output": "select count(distinct role_code) from project_staff"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the total amount of grants given by each organisations? Also list the organisation id.", "output": "select sum(grant_amount), organisation_id from grants group by organisation_id"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the total amount of grant money given to each organization and what is its id?", "output": "select sum(grant_amount), organisation_id from grants group by organisation_id"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List the project details of the projects with the research outcome described with the substring 'Published'.", "output": "select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id join research_outcomes as t3 on t2.outcome_code = t3.outcome_code where t3.outcome_description like '%published%'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the details for the project whose research has been published?", "output": "select t1.project_details from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id join research_outcomes as t3 on t2.outcome_code = t3.outcome_code where t3.outcome_description like '%published%'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many staff does each project has? List the project id and the number in an ascending order.", "output": "select t1.project_id, count(*) from project_staff as t1 join projects as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) asc"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "For each project id, how many staff does it have? List them in increasing order.", "output": "select t1.project_id, count(*) from project_staff as t1 join projects as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) asc"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the complete description of the researcher role.", "output": "select role_description from staff_roles where role_code = 'researcher'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the complete description of the job of a researcher?", "output": "select role_description from staff_roles where role_code = 'researcher'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "When did the first staff for the projects started working?", "output": "select date_from from project_staff order by date_from asc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "When did the first staff member start working?", "output": "select date_from from project_staff order by date_from asc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Which project made the most number of outcomes? List the project details and the project id.", "output": "select t1.project_details, t1.project_id from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the details and id of the project with the most outcomes?", "output": "select t1.project_details, t1.project_id from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.project_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Which projects have no outcome? List the project details.", "output": "select project_details from projects where project_id not in ( select project_id from project_outcomes )"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the details of the project with no outcomes?", "output": "select project_details from projects where project_id not in ( select project_id from project_outcomes )"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Which organisation hired the most number of research staff? List the organisation id, type and detail.", "output": "select t1.organisation_id, t1.organisation_type, t1.organisation_details from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the ids, types, and details of the organization with the most research staff?", "output": "select t1.organisation_id, t1.organisation_type, t1.organisation_details from organisations as t1 join research_staff as t2 on t1.organisation_id = t2.employer_organisation_id group by t1.organisation_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Show the role description and the id of the project staff involved in most number of project outcomes?", "output": "select t1.role_description, t2.staff_id from staff_roles as t1 join project_staff as t2 on t1.role_code = t2.role_code join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.staff_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "For each staff id, what is the description of the role that is involved with the most number of projects?", "output": "select t1.role_description, t2.staff_id from staff_roles as t1 join project_staff as t2 on t1.role_code = t2.role_code join project_outcomes as t3 on t2.project_id = t3.project_id group by t2.staff_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Which document type is described with the prefix 'Initial'?", "output": "select document_type_code from document_types where document_description like 'Initial%'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the type of the document whose description starts with the word 'Initial'?", "output": "select document_type_code from document_types where document_description like 'Initial%'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. The document_description contains values such as Initial Application, Regular. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.", "output": "select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Regular' intersect select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Initial Application'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. The document_description contains values such as Regular, Initial Application. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "For grants that have descriptions of Regular and Initial Applications, what are their start dates?", "output": "select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Regular' intersect select t1.grant_start_date from grants as t1 join documents as t2 on t1.grant_id = t2.grant_id join document_types as t3 on t2.document_type_code = t3.document_type_code where t3.document_description = 'Initial Application'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many documents can one grant have at most? List the grant id and number.", "output": "select grant_id, count(*) from documents group by grant_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "For each grant id, how many documents does it have, and which one has the most?", "output": "select grant_id, count(*) from documents group by grant_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. The organisation_details contains values such as quo. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. The staff_details contains values such as quo. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Find the organisation type description of the organisation detailed as 'quo'.", "output": "select t1.organisation_type_description from organisation_types as t1 join organisations as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_details = 'quo'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. The organisation_details contains values such as quo. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. The staff_details contains values such as quo. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the type description of the organization whose detail is listed as 'quo'?", "output": "select t1.organisation_type_description from organisation_types as t1 join organisations as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_details = 'quo'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Sponsor. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.", "output": "select organisation_details from organisations as t1 join organisation_types as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_type_description = 'Sponsor' order by organisation_details"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Sponsor. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the details of all organizations that are described as Sponsors and sort the results in ascending order?", "output": "select organisation_details from organisations as t1 join organisation_types as t2 on t1.organisation_type = t2.organisation_type where t2.organisation_type_description = 'Sponsor' order by organisation_details"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. The outcome_code contains values such as Patent. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. The outcome_code contains values such as Patent. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many Patent outcomes are generated from all the projects?", "output": "select count(*) from project_outcomes where outcome_code = 'Patent'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. The outcome_code contains values such as Patent. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. The outcome_code contains values such as Patent. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many patents outcomes were listed for all the projects?", "output": "select count(*) from project_outcomes where outcome_code = 'Patent'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as leader.The date_from contains values such as 1989-04-24 23:51:54. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as leader. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?", "output": "select count(*) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as leader.The date_from contains values such as 1989-04-24 23:51:54. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as leader. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many project members were leaders or started working before '1989-04-24 23:51:54'?", "output": "select count(*) from project_staff where role_code = 'leader' or date_from < '1989-04-24 23:51:54'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the last date of the staff leaving the projects?", "output": "select date_to from project_staff order by date_to desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the last date that a staff member left a project?", "output": "select date_to from project_staff order by date_to desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. The project_details contains values such as sint. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. The staff_details contains values such as sint. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the result description of the project whose detail is 'sint'?", "output": "select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code join projects as t3 on t2.project_id = t3.project_id where t3.project_details = 'sint'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. The project_details contains values such as sint. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. The staff_details contains values such as sint. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the description for the results whose project detail is 'sint'?", "output": "select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code join projects as t3 on t2.project_id = t3.project_id where t3.project_details = 'sint'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List the organisation id with the maximum outcome count, and the count.", "output": "select t1.organisation_id, count(*) from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.organisation_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the id of the organization with the maximum number of outcomes and how many outcomes are there?", "output": "select t1.organisation_id, count(*) from projects as t1 join project_outcomes as t2 on t1.project_id = t2.project_id group by t1.organisation_id order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List the project details of the projects launched by the organisation", "output": "select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count(*) desc limit 1 )"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the details for the projects which were launched by the organization with the most projects?", "output": "select project_details from projects where organisation_id in ( select organisation_id from projects group by organisation_id order by count(*) desc limit 1 )"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List the research staff details, and order in ascending order.", "output": "select staff_details from research_staff order by staff_details asc"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. The organisation_type_description contains values such as Research. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The role_code contains values such as researcher. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. The role_code contains values such as researcher. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What details are there on the research staff? List the result in ascending alphabetical order.", "output": "select staff_details from research_staff order by staff_details asc"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many tasks are there in total?", "output": "select count(*) from tasks"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many tasks are there?", "output": "select count(*) from tasks"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "How many tasks does each project have? List the task count and the project detail.", "output": "select count(*), t1.project_details from projects as t1 join tasks as t2 on t1.project_id = t2.project_id group by t1.project_id"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "For each project id, how many tasks are there?", "output": "select count(*), t1.project_details from projects as t1 join tasks as t2 on t1.project_id = t2.project_id group by t1.project_id"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the staff roles of the staff who", "output": "select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. The date_from contains values such as 2003-04-19 15:06:20.The date_to contains values such as 2016-03-15 00:33:18. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What roles did staff members play between '2003-04-19 15:06:20' and '2016-03-15 00:33:18'?", "output": "select role_code from project_staff where date_from > '2003-04-19 15:06:20' and date_to < '2016-03-15 00:33:18'"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What are the descriptions of all the project outcomes?", "output": "select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "List the description of the outcomes for all projects.", "output": "select t1.outcome_description from research_outcomes as t1 join project_outcomes as t2 on t1.outcome_code = t2.outcome_code"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "Which role is most common for the staff?", "output": "select role_code from project_staff group by role_code order by count(*) desc limit 1"}, {"instruction": "tracking_grants_for_research contains tables such as document_types, documents, grants, organisation_types, organisations, project_outcomes, project_staff, projects, research_outcomes, research_staff, staff_roles, tasks. Table document_types has columns such as document_type_code, document_description. document_type_code is the primary key. Table documents has columns such as document_id, document_type_code, grant_id, sent_date, response_received_date, other_details. document_id is the primary key. Table grants has columns such as grant_id, organisation_id, grant_amount, grant_start_date, grant_end_date, other_details. grant_id is the primary key. Table organisation_types has columns such as organisation_type, organisation_type_description. organisation_type is the primary key. Table organisations has columns such as organisation_id, organisation_type, organisation_details. organisation_id is the primary key. Table project_outcomes has columns such as project_id, outcome_code, outcome_details. is the primary key. Table project_staff has columns such as staff_id, project_id, role_code, date_from, date_to, other_details. staff_id is the primary key. Table projects has columns such as project_id, organisation_id, project_details. project_id is the primary key. Table research_outcomes has columns such as outcome_code, outcome_description. outcome_code is the primary key. Table research_staff has columns such as staff_id, employer_organisation_id, staff_details. staff_id is the primary key. Table staff_roles has columns such as role_code, role_description. role_code is the primary key. Table tasks has columns such as task_id, project_id, task_details, eg agree objectives. task_id is the primary key. The grant_id of documents is the foreign key of grant_id of grants. The document_type_code of documents is the foreign key of document_type_code of document_types. The organisation_id of grants is the foreign key of organisation_id of organisations. The organisation_type of organisations is the foreign key of organisation_type of organisation_types. The outcome_code of project_outcomes is the foreign key of outcome_code of research_outcomes. The project_id of project_outcomes is the foreign key of project_id of projects. The role_code of project_staff is the foreign key of role_code of staff_roles. The project_id of project_staff is the foreign key of project_id of projects. The organisation_id of projects is the foreign key of organisation_id of organisations. The employer_organisation_id of research_staff is the foreign key of organisation_id of organisations. The project_id of tasks is the foreign key of project_id of projects.", "input": "What is the most common role for the staff?", "output": "select role_code from project_staff group by role_code order by count(*) desc limit 1"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Dan. Table personfriend has columns such as name, friend, year. is the primary key. The friend contains values such as Dan. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many friends does Dan have?", "output": "select count(t2.friend) from person as t1 join personfriend as t2 on t1.name = t2.name where t1.name = 'Dan'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Dan. Table personfriend has columns such as name, friend, year. is the primary key. The friend contains values such as Dan. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many friends does Dan have?", "output": "select count(t2.friend) from person as t1 join personfriend as t2 on t1.name = t2.name where t1.name = 'Dan'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as female. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many females does this network has?", "output": "select count(*) from person where gender = 'female'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as female. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many females are in the network?", "output": "select count(*) from person where gender = 'female'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the average age for all person?", "output": "select avg(age) from person"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the average age for all people in the table?", "output": "select avg(age) from person"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many different cities are they from?", "output": "select count(distinct city) from person"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many different cities do people originate from?", "output": "select count(distinct city) from person"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many type of jobs do they have?", "output": "select count(distinct job) from person"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many different jobs are listed?", "output": "select count(distinct job) from person"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who is the oldest person?", "output": "select name from person where age = (select max(age) from person)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the name of the person who is the oldest?", "output": "select name from person where age = (select max(age) from person)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as student. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who is the oldest person whose job is student?", "output": "select name from person where job = 'student' and age = (select max(age) from person where job = 'student' )"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as student. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the name of the oldest student?", "output": "select name from person where job = 'student' and age = (select max(age) from person where job = 'student' )"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as male. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who is the youngest male?", "output": "select name from person where gender = 'male' and age = (select min(age) from person where gender = 'male' )"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as male. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the name of the youngest male?", "output": "select name from person where gender = 'male' and age = (select min(age) from person where gender = 'male' )"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach.The job contains values such as doctor. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How old is the doctor named Zach?", "output": "select age from person where job = 'doctor' and name = 'Zach'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach.The job contains values such as doctor. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the age of the doctor named Zach?", "output": "select age from person where job = 'doctor' and name = 'Zach'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who is the person whose age is below 30?", "output": "select name from person where age < 30"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the name of the person whose age is below 30?", "output": "select name from person where age < 30"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as engineer. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many people whose age is greater 30 and job is engineer?", "output": "select count(*) from person where age > 30 and job = 'engineer'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as engineer. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "HOw many engineers are older than 30?", "output": "select count(*) from person where age > 30 and job = 'engineer'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the average age for each gender?", "output": "select avg(age), gender from person group by gender"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How old is each gender, on average?", "output": "select avg(age), gender from person group by gender"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is average age for different job title?", "output": "select avg(age), job from person group by job"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How old is the average person for each job?", "output": "select avg(age), job from person group by job"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as male. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is average age of male for different job title?", "output": "select avg(age), job from person where gender = 'male' group by job"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as male. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the average age for a male in each job?", "output": "select avg(age), job from person where gender = 'male' group by job"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is minimum age for different job title?", "output": "select min(age), job from person group by job"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How old is the youngest person for each job?", "output": "select min(age), job from person group by job"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the number of people who is under 40 for each gender.", "output": "select count(*), gender from person where age < 40 group by gender"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many people are under 40 for each gender?", "output": "select count(*), gender from person where age < 40 group by gender"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as engineer. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name of people whose age is greater than any engineer sorted by their age.", "output": "select name from person where age > (select min(age) from person where job = 'engineer') order by age"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as engineer. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the name of all the people who are older than at least one engineer? Order them by age.", "output": "select name from person where age > (select min(age) from person where job = 'engineer') order by age"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as engineer. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the number of people whose age is greater than all engineers.", "output": "select count(*) from person where age > (select max(age) from person where job = 'engineer')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as engineer. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "How many people are older than every engineer?", "output": "select count(*) from person where age > (select max(age) from person where job = 'engineer')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "list the name, job title of all people ordered by their names.", "output": "select name, job from person order by name"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names and job titles of every person ordered alphabetically by name?", "output": "select name, job from person order by name"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the names of all person sorted in the descending order using age.", "output": "select name from person order by age desc"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of everybody sorted by age in descending order?", "output": "select name from person order by age desc"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as male. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name and age of all males in order of their age.", "output": "select name from person where gender = 'male' order by age"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The gender contains values such as male. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the name and age of every male? Order the results by age.", "output": "select name from person where gender = 'male' order by age"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Dan, Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Dan, Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name and age of the person who is a friend of both Dan and Alice.", "output": "select t1.name, t1.age from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Dan' intersect select t1.name, t1.age from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Alice'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Dan, Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Dan, Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names and ages of every person who is a friend of both Dan and Alice?", "output": "select t1.name, t1.age from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Dan' intersect select t1.name, t1.age from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Alice'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Dan, Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Dan, Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name and age of the person who is a friend of Dan or Alice.", "output": "select distinct t1.name, t1.age from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Dan' or t2.friend = 'Alice'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Dan, Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Dan, Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the different names and ages of every friend of either Dan or alice?", "output": "select distinct t1.name, t1.age from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Dan' or t2.friend = 'Alice'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name of the person who has friends with age above 40 and under age 30?", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age > 40) intersect select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age < 30)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of every person who has a friend over 40 and under 30?", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age > 40) intersect select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age < 30)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name of the person who has friends with age above 40 but not under age 30?", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age > 40) except select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age < 30)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of the people who are older 40 but no friends under age 30?", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age > 40) except select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend in (select name from person where age < 30)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as student. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name of the person who has no student friends.", "output": "select name from person except select t2.name from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.job = 'student'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The job contains values such as student. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of the people who have no friends who are students?", "output": "select name from person except select t2.name from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.job = 'student'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the person who has exactly one friend.", "output": "select name from personfriend group by name having count(*) = 1"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of everybody who has exactly one friend?", "output": "select name from personfriend group by name having count(*) = 1"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Bob. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Bob.The friend contains values such as Bob. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who are the friends of Bob?", "output": "select t2.friend from person as t1 join personfriend as t2 on t1.name = t2.name where t1.name = 'Bob'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Bob. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Bob.The friend contains values such as Bob. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who are Bob's friends?", "output": "select t2.friend from person as t1 join personfriend as t2 on t1.name = t2.name where t1.name = 'Bob'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Bob. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Bob.The friend contains values such as Bob. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name of persons who are friends with Bob.", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Bob'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Bob. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Bob.The friend contains values such as Bob. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of all of Bob's friends?", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Bob'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach.The gender contains values such as female. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the names of females who are friends with Zach", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Zach' and t1.gender = 'female'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach.The gender contains values such as female. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of all females who are friends with Zach?", "output": "select t1.name from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Zach' and t1.gender = 'female'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice.The gender contains values such as female. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the female friends of Alice.", "output": "select t2.friend from person as t1 join personfriend as t2 on t1.name = t2.friend where t2.name = 'Alice' and t1.gender = 'female'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice.The gender contains values such as female. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are all the friends of Alice who are female?", "output": "select t2.friend from person as t1 join personfriend as t2 on t1.name = t2.friend where t2.name = 'Alice' and t1.gender = 'female'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice.The gender contains values such as male.The job contains values such as doctor. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the male friend of Alice whose job is a doctor?", "output": "select t2.friend from person as t1 join personfriend as t2 on t1.name = t2.friend where t2.name = 'Alice' and t1.gender = 'male' and t1.job = 'doctor'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice.The job contains values such as doctor. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who are the friends of Alice that are doctors?", "output": "select t2.friend from person as t1 join personfriend as t2 on t1.name = t2.friend where t2.name = 'Alice' and t1.gender = 'male' and t1.job = 'doctor'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The city contains values such as new york city. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who has a friend that is from new york city?", "output": "select t2.name from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.city = 'new york city'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of all friends who are from New York?", "output": "select t2.name from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.city = 'new york city'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who has friends that are younger than the average age?", "output": "select distinct t2.name from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.age < (select avg(age) from person)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the different names of friends who are younger than the average age for a friend?", "output": "select distinct t2.name from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.age < (select avg(age) from person)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who has friends that are older than the average age? Print their friends and their ages as well", "output": "select distinct t2.name, t2.friend, t1.age from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.age > (select avg(age) from person)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Whare the names, friends, and ages of all people who are older than the average age of a person?", "output": "select distinct t2.name, t2.friend, t1.age from person as t1 join personfriend as t2 on t1.name = t2.friend where t1.age > (select avg(age) from person)"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who is the friend of Zach with longest year relationship?", "output": "select friend from personfriend where name = 'Zach' and year = (select max(year) from personfriend where name = 'Zach')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Which friend of Zach has the longest-lasting friendship?", "output": "select friend from personfriend where name = 'Zach' and year = (select max(year) from personfriend where name = 'Zach')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the age of the friend of Zach with longest year relationship?", "output": "select t1.age from person as t1 join personfriend as t2 on t1.name = t2.friend where t2.name = 'Zach' and t2.year = (select max(year) from personfriend where name = 'Zach')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Zach. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Zach.The friend contains values such as Zach. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the ages of all of Zach's friends who are in the longest relationship?", "output": "select t1.age from person as t1 join personfriend as t2 on t1.name = t2.friend where t2.name = 'Zach' and t2.year = (select max(year) from personfriend where name = 'Zach')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name of persons who are friends with Alice for the shortest years.", "output": "select name from personfriend where friend = 'Alice' and year = (select min(year) from personfriend where friend = 'Alice')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of all people who are friends with Alice for the shortest amount of time?", "output": "select name from personfriend where friend = 'Alice' and year = (select min(year) from personfriend where friend = 'Alice')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find the name, age, and job title of persons who are friends with Alice for the longest years.", "output": "select t1.name, t1.age, t1.job from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Alice' and t2.year = (select max(year) from personfriend where friend = 'Alice')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?", "output": "select t1.name, t1.age, t1.job from person as t1 join personfriend as t2 on t1.name = t2.name where t2.friend = 'Alice' and t2.year = (select max(year) from personfriend where friend = 'Alice')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Who is the person that has no friend?", "output": "select name from person except select name from personfriend"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of all people who do not have friends?", "output": "select name from person except select name from personfriend"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Which person whose friends have the oldest average age?", "output": "select t2.name, avg(t1.age) from person as t1 join personfriend as t2 on t1.name = t2.friend group by t2.name order by avg(t1.age) desc limit 1"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the name of the person who has the oldest average age for their friends, and what is that average age?", "output": "select t2.name, avg(t1.age) from person as t1 join personfriend as t2 on t1.name = t2.friend group by t2.name order by avg(t1.age) desc limit 1"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The city contains values such as austin. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the total number of people who has no friend living in the city of Austin.", "output": "select count(distinct name) from personfriend where friend not in (select name from person where city = 'Austin')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The city contains values such as austin. Table personfriend has columns such as name, friend, year. is the primary key. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What is the total number of people who have no friends living in Austin?", "output": "select count(distinct name) from personfriend where friend not in (select name from person where city = 'Austin')"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "Find Alice's friends of friends.", "output": "select distinct t4.name from personfriend as t1 join person as t2 on t1.name = t2.name join personfriend as t3 on t1.friend = t3.name join personfriend as t4 on t3.friend = t4.name where t2.name = 'Alice' and t4.name != 'Alice'"}, {"instruction": "network_2 contains tables such as person, personfriend. Table person has columns such as name, age, city, gender, job. name is the primary key. The name contains values such as Alice. Table personfriend has columns such as name, friend, year. is the primary key. The name contains values such as Alice.The friend contains values such as Alice. The friend of personfriend is the foreign key of name of person. The name of personfriend is the foreign key of name of person.", "input": "What are the names of all of Alice's friends of friends?", "output": "select distinct t4.name from personfriend as t1 join person as t2 on t1.name = t2.name join personfriend as t3 on t1.friend = t3.name join personfriend as t4 on t3.friend = t4.name where t2.name = 'Alice' and t4.name != 'Alice'"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "How many members are there?", "output": "select count(*) from member"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "List the names of members in ascending alphabetical order.", "output": "select name from member order by name asc"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "What are the names and countries of members?", "output": "select name, country from member"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. The country contains values such as United States, Canada. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the names of members whose country is \"United States\" or \"Canada\".", "output": "select name from member where country = \"United States\" or country = \"Canada\""}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the different countries and the number of members from each.", "output": "select country, count(*) from member group by country"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the most common country across members.", "output": "select country from member group by country order by count(*) desc limit 1"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Which countries have more than two members?", "output": "select country from member group by country having count(*) > 2"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the leader names and locations of colleges.", "output": "select leader_name, college_location from college"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the names of members and names of colleges they go to.", "output": "select t2.name, t1.name from college as t1 join member as t2 on t1.college_id = t2.college_id"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.", "output": "select t2.name, t1.college_location from college as t1 join member as t2 on t1.college_id = t2.college_id order by t2.name asc"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. The country contains values such as Canada. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the distinct leader names of colleges associated with members from country \"Canada\".", "output": "select distinct t1.leader_name from college as t1 join member as t2 on t1.college_id = t2.college_id where t2.country = \"Canada\""}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the names of members and the decoration themes they have.", "output": "select t1.name, t2.decoration_theme from member as t1 join round as t2 on t1.member_id = t2.member_id"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the names of members that have a rank in round higher than 3.", "output": "select t1.name from member as t1 join round as t2 on t1.member_id = t2.member_id where t2.rank_in_round > 3"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "Show the names of members in ascending order of their rank in rounds.", "output": "select t1.name from member as t1 join round as t2 on t1.member_id = t2.member_id order by rank_in_round asc"}, {"instruction": "decoration_competition contains tables such as college, member, round. Table college has columns such as college_id, name, leader_name, college_location. college_id is the primary key. Table member has columns such as member_id, name, country, college_id. member_id is the primary key. Table round has columns such as round_id, member_id, decoration_theme, rank_in_round. member_id is the primary key. The college_id of member is the foreign key of college_id of college. The member_id of round is the foreign key of member_id of member.", "input": "List the names of members who did not participate in any round.", "output": "select name from member where member_id not in (select member_id from round)"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the name and access counts of all documents, in alphabetic order of the document name.", "output": "select document_name, access_count from documents order by document_name"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the names of all the documents, as well as the access counts of each, ordered alphabetically?", "output": "select document_name, access_count from documents order by document_name"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?", "output": "select document_name, access_count from documents order by access_count desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the name of the document which has been accessed the most times, as well as the number of times it has been accessed?", "output": "select document_name, access_count from documents order by access_count desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the types of documents with more than 4 documents.", "output": "select document_type_code from documents group by document_type_code having count(*) > 4"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the codes of types of documents of which there are for or more?", "output": "select document_type_code from documents group by document_type_code having count(*) > 4"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the total access count of all documents in the most popular document type.", "output": "select sum(access_count) from documents group by document_type_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the total access count of documents that are of the most common document type?", "output": "select sum(access_count) from documents group by document_type_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the average access count of documents?", "output": "select avg(access_count) from documents"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the average access count across all documents?", "output": "select avg(access_count) from documents"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the structure of the document with the least number of accesses?", "output": "select t2.document_structure_description from documents as t1 join document_structures as t2 on t1.document_structure_code = t2.document_structure_code group by t1.document_structure_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Return the structure description of the document that has been accessed the fewest number of times.", "output": "select t2.document_structure_description from documents as t1 join document_structures as t2 on t1.document_structure_code = t2.document_structure_code group by t1.document_structure_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. The document_type_code contains values such as CV.The document_name contains values such as David CV. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the type of the document named \"David CV\"?", "output": "select document_type_code from documents where document_name = \"David CV\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. The document_type_code contains values such as CV.The document_name contains values such as David CV. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Return the type code of the document named \"David CV\".", "output": "select document_type_code from documents where document_name = \"David CV\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the list of documents that are both in the most three popular type and have the most three popular structure.", "output": "select document_name from documents group by document_type_code order by count(*) desc limit 3 intersect select document_name from documents group by document_structure_code order by count(*) desc limit 3"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the names of documents that have both one of the three most common types and one of three most common structures?", "output": "select document_name from documents group by document_type_code order by count(*) desc limit 3 intersect select document_name from documents group by document_structure_code order by count(*) desc limit 3"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What document types do have more than 10000 total access number.", "output": "select document_type_code from documents group by document_type_code having sum(access_count) > 10000"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Return the codes of the document types that do not have a total access count of over 10000.", "output": "select document_type_code from documents group by document_type_code having sum(access_count) > 10000"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. The document_type_code contains values such as CV.The document_name contains values such as David CV. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are all the section titles of the document named \"David CV\"?", "output": "select t2.section_title from documents as t1 join document_sections as t2 on t1.document_code = t2.document_code where t1.document_name = \"David CV\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. The document_type_code contains values such as CV.The document_name contains values such as David CV. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Give the section titles of the document with the name \"David CV\".", "output": "select t2.section_title from documents as t1 join document_sections as t2 on t1.document_code = t2.document_code where t1.document_name = \"David CV\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find all the name of documents without any sections.", "output": "select document_name from documents where document_code not in (select document_code from document_sections)"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the names of documents that do not have any sections?", "output": "select document_name from documents where document_code not in (select document_code from document_sections)"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "List all the username and passwords of users with the most popular role.", "output": "select user_name, password from users group by role_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the usernames and passwords of users that have the most common role?", "output": "select user_name, password from users group by role_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. The functional_area_description contains values such as Acknowledgement. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the average access counts of documents with functional area \"Acknowledgement\".", "output": "select avg(t1.access_count) from documents as t1 join document_functional_areas as t2 on t1.document_code = t2.document_code join functional_areas as t3 on t2.functional_area_code = t3.functional_area_code where t3.functional_area_description = \"Acknowledgement\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. The functional_area_description contains values such as Acknowledgement. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the average access counts of documents that have the functional area description \"Acknowledgement\"?", "output": "select avg(t1.access_count) from documents as t1 join document_functional_areas as t2 on t1.document_code = t2.document_code join functional_areas as t3 on t2.functional_area_code = t3.functional_area_code where t3.functional_area_description = \"Acknowledgement\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find names of the document without any images.", "output": "select document_name from documents except select t1.document_name from documents as t1 join document_sections as t2 on t1.document_code = t2.document_code join document_sections_images as t3 on t2.section_id = t3.section_id"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the names of documents that do not have any images?", "output": "select document_name from documents except select t1.document_name from documents as t1 join document_sections as t2 on t1.document_code = t2.document_code join document_sections_images as t3 on t2.section_id = t3.section_id"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the name of the document with the most number of sections?", "output": "select t1.document_name from documents as t1 join document_sections as t2 on t1.document_code = t2.document_code group by t1.document_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Return the name of the document that has the most sections.", "output": "select t1.document_name from documents as t1 join document_sections as t2 on t1.document_code = t2.document_code group by t1.document_code order by count(*) desc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. The document_type_code contains values such as CV. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "List all the document names which contains \"CV\".", "output": "select document_name from documents where document_name like \"%cv%\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. The document_type_code contains values such as CV. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the names of documents that contain the substring \"CV\"?", "output": "select document_name from documents where document_name like \"%cv%\""}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "How many users are logged in?", "output": "select count(*) from users where user_login = 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Count the number of users that are logged in.", "output": "select count(*) from users where user_login = 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the description of the most popular role among the users that have logged in.", "output": "select role_description from roles where role_code = (select role_code from users where user_login = 1 group by role_code order by count(*) desc limit 1)"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the description of the most popular role among users that have logged in?", "output": "select role_description from roles where role_code = (select role_code from users where user_login = 1 group by role_code order by count(*) desc limit 1)"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the average access count of documents with the least popular structure.", "output": "select avg(access_count) from documents group by document_structure_code order by count(*) asc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What is the average access count of documents that have the least common structure?", "output": "select avg(access_count) from documents group by document_structure_code order by count(*) asc limit 1"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "List all the image name and URLs in the order of their names.", "output": "select image_name, image_url from images order by image_name"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. The image_alt_text contains values such as Name. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the names and urls of images, sorted alphabetically?", "output": "select image_name, image_url from images order by image_name"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Find the number of users in each role.", "output": "select count(*), role_code from users group by role_code"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What are the different role codes for users, and how many users have each?", "output": "select count(*), role_code from users group by role_code"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "What document types have more than 2 corresponding documents?", "output": "select document_type_code from documents group by document_type_code having count(*) > 2"}, {"instruction": "document_management contains tables such as roles, users, document_structures, functional_areas, images, documents, document_functional_areas, document_sections, document_sections_images. Table roles has columns such as role_code, role_description. role_code is the primary key. Table users has columns such as user_id, role_code, user_name, user_login, password. user_id is the primary key. Table document_structures has columns such as document_structure_code, parent_document_structure_code, document_structure_description. document_structure_code is the primary key. Table functional_areas has columns such as functional_area_code, parent_functional_area_code, functional_area_description. functional_area_code is the primary key. Table images has columns such as image_id, image_alt_text, image_name, image_url. image_id is the primary key. Table documents has columns such as document_code, document_structure_code, document_type_code, access_count, document_name. document_code is the primary key. Table document_functional_areas has columns such as document_code, functional_area_code. is the primary key. Table document_sections has columns such as section_id, document_code, section_sequence, section_code, section_title. section_id is the primary key. Table document_sections_images has columns such as section_id, image_id. section_id is the primary key. The role_code of users is the foreign key of role_code of roles. The document_structure_code of documents is the foreign key of document_structure_code of document_structures. The functional_area_code of document_functional_areas is the foreign key of functional_area_code of functional_areas. The document_code of document_functional_areas is the foreign key of document_code of documents. The document_code of document_sections is the foreign key of document_code of documents. The image_id of document_sections_images is the foreign key of image_id of images. The section_id of document_sections_images is the foreign key of section_id of document_sections.", "input": "Give the codes of document types that have more than 2 corresponding documents.", "output": "select document_type_code from documents group by document_type_code having count(*) > 2"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "How many companies are there?", "output": "select count(*) from companies"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Count the number of companies.", "output": "select count(*) from companies"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "List the names of companies in descending order of market value.", "output": "select name from companies order by market_value_billion desc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Sort the company names in descending order of the company's market value.", "output": "select name from companies order by market_value_billion desc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The headquarters contains values such as USA. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "What are the names of companies whose headquarters are not \"USA\"?", "output": "select name from companies where headquarters != 'USA'"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The headquarters contains values such as USA. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Find the names of the companies whose headquarters are not located in \"USA\".", "output": "select name from companies where headquarters != 'USA'"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "What are the name and assets of each company, sorted in ascending order of company name?", "output": "select name, assets_billion from companies order by name asc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "List the name and assets of each company in ascending order of company name.", "output": "select name, assets_billion from companies order by name asc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "What are the average profits of companies?", "output": "select avg(profits_billion) from companies"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Compute the average profits companies make.", "output": "select avg(profits_billion) from companies"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The industry contains values such as Banking. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "What are the maximum and minimum sales of the companies whose industries are not \"Banking\".", "output": "select max(sales_billion), min(sales_billion) from companies where industry != \"Banking\""}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The industry contains values such as Banking. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Find the maximum and minimum sales of the companies that are not in the \"Banking\" industry.", "output": "select max(sales_billion), min(sales_billion) from companies where industry != \"Banking\""}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "How many different industries are the companies in?", "output": "select count(distinct industry) from companies"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Count the number of distinct company industries.", "output": "select count(distinct industry) from companies"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "List the names of buildings in descending order of building height.", "output": "select name from buildings order by height desc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "What are the names of buildings sorted in descending order of building height?", "output": "select name from buildings order by height desc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Find the stories of the building with the largest height.", "output": "select stories from buildings order by height desc limit 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "What is the stories of highest building?", "output": "select stories from buildings order by height desc limit 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "List the name of a building along with the name of a company whose office is in the building.", "output": "select t3.name, t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id join companies as t3 on t1.company_id = t3.id"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "For each company, return the company name and the name of the building its office is located in.", "output": "select t3.name, t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id join companies as t3 on t1.company_id = t3.id"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Show the names of the buildings that have more than one company offices.", "output": "select t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id join companies as t3 on t1.company_id = t3.id group by t1.building_id having count(*) > 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Which buildings have more than one company offices? Give me the building names.", "output": "select t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id join companies as t3 on t1.company_id = t3.id group by t1.building_id having count(*) > 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Show the name of the building that has the most company offices.", "output": "select t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id join companies as t3 on t1.company_id = t3.id group by t1.building_id order by count(*) desc limit 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Which building has the largest number of company offices? Give me the building name.", "output": "select t2.name from office_locations as t1 join buildings as t2 on t1.building_id = t2.id join companies as t3 on t1.company_id = t3.id group by t1.building_id order by count(*) desc limit 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. The status contains values such as on-hold. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Please show the names of the buildings whose status is \"on-hold\", in ascending order of stories.", "output": "select name from buildings where status = \"on-hold\" order by stories asc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. The status contains values such as on-hold. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Find the names of the buildings in \"on-hold\" status, and sort them in ascending order of building stories.", "output": "select name from buildings where status = \"on-hold\" order by stories asc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Please show each industry and the corresponding number of companies in that industry.", "output": "select industry, count(*) from companies group by industry"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Whah are the name of each industry and the number of companies in that industry?", "output": "select industry, count(*) from companies group by industry"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Please show the industries of companies in descending order of the number of companies.", "output": "select industry from companies group by industry order by count(*) desc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Sort all the industries in descending order of the count of companies in each industry", "output": "select industry from companies group by industry order by count(*) desc"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "List the industry shared by the most companies.", "output": "select industry from companies group by industry order by count(*) desc limit 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Which industry has the most companies?", "output": "select industry from companies group by industry order by count(*) desc limit 1"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "List the names of buildings that have no company office.", "output": "select name from buildings where id not in (select building_id from office_locations)"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Which buildings do not have any company office? Give me the building names.", "output": "select name from buildings where id not in (select building_id from office_locations)"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The headquarters contains values such as China, USA. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Show the industries shared by companies whose headquarters are \"USA\" and companies whose headquarters are \"China\".", "output": "select industry from companies where headquarters = \"USA\" intersect select industry from companies where headquarters = \"China\""}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The headquarters contains values such as China, USA. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Which industries have both companies with headquarter in \"USA\" and companies with headquarter in \"China\"?", "output": "select industry from companies where headquarters = \"USA\" intersect select industry from companies where headquarters = \"China\""}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The industry contains values such as Conglomerate, Banking. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Find the number of companies whose industry is \"Banking\" or \"Conglomerate\",", "output": "select count(*) from companies where industry = \"Banking\" or industry = \"Conglomerate\""}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. The industry contains values such as Conglomerate, Banking. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "How many companies are in either \"Banking\" industry or \"Conglomerate\" industry?", "output": "select count(*) from companies where industry = \"Banking\" or industry = \"Conglomerate\""}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Show the headquarters shared by more than two companies.", "output": "select headquarters from companies group by headquarters having count(*) > 2"}, {"instruction": "company_office contains tables such as buildings, companies, office_locations. Table buildings has columns such as id, name, city, height, stories, status. id is the primary key. Table companies has columns such as id, name, headquarters, industry, sales_billion, profits_billion, assets_billion, market_value_billion. id is the primary key. Table office_locations has columns such as building_id, company_id, move_in_year. building_id is the primary key. The company_id of office_locations is the foreign key of id of companies. The building_id of office_locations is the foreign key of id of buildings.", "input": "Which headquarter locations are used by more than 2 companies?", "output": "select headquarters from companies group by headquarters having count(*) > 2"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "How many products are there?", "output": "select count(*) from products"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "List the name of products in ascending order of price.", "output": "select product_name from products order by product_price asc"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "What are the names and type codes of products?", "output": "select product_name, product_type_code from products"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_name contains values such as Trading Policy. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the prices of the products named \"Dining\" or \"Trading Policy\".", "output": "select product_price from products where product_name = \"Dining\" or product_name = \"Trading Policy\""}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "What is the average price for products?", "output": "select avg(product_price) from products"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "What is the name of the product with the highest price?", "output": "select product_name from products order by product_price desc limit 1"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show different type codes of products and the number of products with each type code.", "output": "select product_type_code, count(*) from products group by product_type_code"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the most common type code across products.", "output": "select product_type_code from products group by product_type_code order by count(*) desc limit 1"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the product type codes that have at least two products.", "output": "select product_type_code from products group by product_type_code having count(*) >= 2"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.", "output": "select product_type_code from products where product_price > 4500 intersect select product_type_code from products where product_price < 3000"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the names of products and the number of events they are in.", "output": "select t1.product_name, count(*) from products as t1 join products_in_events as t2 on t1.product_id = t2.product_id group by t1.product_name"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the names of products and the number of events they are in, sorted by the number of events in descending order.", "output": "select t1.product_name, count(*) from products as t1 join products_in_events as t2 on t1.product_id = t2.product_id group by t1.product_name order by count(*) desc"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the names of products that are in at least two events.", "output": "select t1.product_name from products as t1 join products_in_events as t2 on t1.product_id = t2.product_id group by t1.product_name having count(*) >= 2"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "Show the names of products that are in at least two events in ascending alphabetical order of product name.", "output": "select t1.product_name from products as t1 join products_in_events as t2 on t1.product_id = t2.product_id group by t1.product_name having count(*) >= 2 order by t1.product_name"}, {"instruction": "solvency_ii contains tables such as addresses, locations, products, parties, assets, channels, finances, events, products_in_events, parties_in_events, agreements, assets_in_events. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table locations has columns such as location_id, other_details. location_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table parties has columns such as party_id, party_details. party_id is the primary key. Table assets has columns such as asset_id, other_details. asset_id is the primary key. Table channels has columns such as channel_id, other_details. channel_id is the primary key. Table finances has columns such as finance_id, other_details. finance_id is the primary key. Table events has columns such as event_id, address_id, channel_id, event_type_code, finance_id, location_id. event_id is the primary key. Table products_in_events has columns such as product_in_event_id, event_id, product_id. product_in_event_id is the primary key. Table parties_in_events has columns such as party_id, event_id, role_code. party_id is the primary key. Table agreements has columns such as document_id, event_id. document_id is the primary key. Table assets_in_events has columns such as asset_id, event_id. asset_id is the primary key. The finance_id of events is the foreign key of finance_id of finances. The address_id of events is the foreign key of address_id of addresses. The location_id of events is the foreign key of location_id of locations. The product_id of products_in_events is the foreign key of product_id of products. The event_id of products_in_events is the foreign key of event_id of events. The event_id of parties_in_events is the foreign key of event_id of events. The party_id of parties_in_events is the foreign key of party_id of parties. The event_id of agreements is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events. The event_id of assets_in_events is the foreign key of event_id of events.", "input": "List the names of products that are not in any event.", "output": "select product_name from products where product_id not in (select product_id from products_in_events)"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "How many artworks are there?", "output": "select count(*) from artwork"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "List the name of artworks in ascending alphabetical order.", "output": "select name from artwork order by name asc"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. The type contains values such as Program Talent Show. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "List the name of artworks whose type is not \"Program Talent Show\".", "output": "select name from artwork where type != \"Program talent Show\""}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "What are the names and locations of festivals?", "output": "select festival_name, location from festival_detail"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "What are the names of the chairs of festivals, sorted in ascending order of the year held?", "output": "select chair_name from festival_detail order by year asc"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "What is the location of the festival with the largest number of audience?", "output": "select location from festival_detail order by num_of_audience desc limit 1"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "What are the names of festivals held in year 2007?", "output": "select festival_name from festival_detail where year = 2007"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "What is the average number of audience for festivals?", "output": "select avg(num_of_audience) from festival_detail"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Show the names of the three most recent festivals.", "output": "select festival_name from festival_detail order by year desc limit 3"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The result contains values such as Nominated. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "For each nomination, show the name of the artwork and name of the festival where it is nominated.", "output": "select t2.name, t3.festival_name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The result contains values such as Nominated. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Show distinct types of artworks that are nominated in festivals in 2007.", "output": "select distinct t2.type from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id where t3.year = 2007"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The result contains values such as Nominated. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Show the names of artworks in ascending order of the year they are nominated in.", "output": "select t2.name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id order by t3.year"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. The type contains values such as Program Talent Show. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The result contains values such as Nominated. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Show the names of festivals that have nominated artworks of type \"Program Talent Show\".", "output": "select t3.festival_name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id where t2.type = \"Program talent Show\""}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Show the ids and names of festivals that have at least two nominations for artworks.", "output": "select t1.festival_id, t3.festival_name from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id group by t1.festival_id having count(*) >= 2"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The result contains values such as Nominated. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Show the id, name of each festival and the number of artworks it has nominated.", "output": "select t1.festival_id, t3.festival_name, count(*) from nomination as t1 join artwork as t2 on t1.artwork_id = t2.artwork_id join festival_detail as t3 on t1.festival_id = t3.festival_id group by t1.festival_id"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Please show different types of artworks with the corresponding number of artworks of each type.", "output": "select type, count(*) from artwork group by type"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "List the most common type of artworks.", "output": "select type from artwork group by type order by count(*) desc limit 1"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "List the year in which there are more than one festivals.", "output": "select year from festival_detail group by year having count(*) > 1"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The result contains values such as Nominated. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "List the name of artworks that are not nominated.", "output": "select name from artwork where artwork_id not in (select artwork_id from nomination)"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "Show the number of audience in year 2008 or 2010.", "output": "select num_of_audience from festival_detail where year = 2008 or year = 2010"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "What are the total number of the audiences who visited any of the festivals?", "output": "select sum(num_of_audience) from festival_detail"}, {"instruction": "entertainment_awards contains tables such as festival_detail, artwork, nomination. Table festival_detail has columns such as festival_id, festival_name, chair_name, location, year, num_of_audience. festival_id is the primary key. The location contains values such as United States. Table artwork has columns such as artwork_id, type, name. artwork_id is the primary key. Table nomination has columns such as artwork_id, festival_id, result. artwork_id is the primary key. The festival_id of nomination is the foreign key of festival_id of festival_detail. The artwork_id of nomination is the foreign key of artwork_id of artwork.", "input": "In which year are there festivals both inside the 'United States' and outside the 'United States'?", "output": "select year from festival_detail where location = 'United States' intersect select year from festival_detail where location != 'United States'"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many premises are there?", "output": "select count(*) from premises"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are all the distinct premise types?", "output": "select distinct premises_type from premises"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. The outcome_code contains values such as Order. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the types and details for all premises and order by the premise type.", "output": "select premises_type, premise_details from premises order by premises_type"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show each premise type and the number of premises in that type.", "output": "select premises_type, count(*) from premises group by premises_type"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show all distinct product categories along with the number of mailshots in each category.", "output": "select product_category, count(*) from mailshot_campaigns group by product_category"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the name and phone of the customer without any mailshot.", "output": "select customer_name, customer_phone from customers where customer_id not in (select customer_id from mailshot_customers)"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. The outcome_code contains values such as No Response. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the name and phone for customers with a mailshot with outcome code 'No Response'.", "output": "select t1.customer_name, t1.customer_phone from customers as t1 join mailshot_customers as t2 on t1.customer_id = t2.customer_id where t2.outcome_code = 'No Response'"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the outcome code of mailshots along with the number of mailshots in each outcome code.", "output": "select outcome_code, count(*) from mailshot_customers group by outcome_code"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. The outcome_code contains values such as Order. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the names of customers who have at least 2 mailshots with outcome code 'Order'.", "output": "select t2.customer_name from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id where outcome_code = 'Order' group by t1.customer_id having count(*) >= 2"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the names of customers who have the most mailshots.", "output": "select t2.customer_name from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. The outcome_code contains values such as No Response, Order. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.", "output": "select t2.customer_name, t2.payment_method from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.outcome_code = 'Order' intersect select t2.customer_name, t2.payment_method from mailshot_customers as t1 join customers as t2 on t1.customer_id = t2.customer_id where t1.outcome_code = 'No Response'"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the premise type and address type code for all customer addresses.", "output": "select t2.premises_type, t1.address_type_code from customer_addresses as t1 join premises as t2 on t1.premise_id = t2.premise_id"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the distinct address type codes for all customer addresses?", "output": "select distinct address_type_code from customer_addresses"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. The address_type_code contains values such as Shipping. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. The order_status_code contains values such as Cancelled, Paid. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. The outcome_code contains values such as Order. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The order_item_status_code contains values such as Cancelled, Paid. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the shipping charge and customer id for customer orders with order status Cancelled or Paid.", "output": "select order_shipping_charges, customer_id from customer_orders where order_status_code = 'Cancelled' or order_status_code = 'Paid'"}, {"instruction": "customers_campaigns_ecommerce contains tables such as premises, products, customers, mailshot_campaigns, customer_addresses, customer_orders, mailshot_customers, order_items. Table premises has columns such as premise_id, premises_type, premise_details. premise_id is the primary key. Table products has columns such as product_id, product_category, product_name. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, customer_phone, customer_email, customer_address, customer_login, customer_password. customer_id is the primary key. Table mailshot_campaigns has columns such as mailshot_id, product_category, mailshot_name, mailshot_start_date, mailshot_end_date. mailshot_id is the primary key. Table customer_addresses has columns such as customer_id, premise_id, date_address_from, address_type_code, date_address_to. is the primary key. The address_type_code contains values such as Shipping. Table customer_orders has columns such as order_id, customer_id, order_status_code, shipping_method_code, order_placed_datetime, order_delivered_datetime, order_shipping_charges. order_id is the primary key. The order_status_code contains values such as Paid.The shipping_method_code contains values such as FedEx. Table mailshot_customers has columns such as mailshot_id, customer_id, outcome_code, mailshot_customer_date. is the primary key. The outcome_code contains values such as Order. Table order_items has columns such as item_id, order_item_status_code, order_id, product_id, item_status_code, item_delivered_datetime, item_order_quantity. is the primary key. The order_item_status_code contains values such as Paid. The customer_id of customer_addresses is the foreign key of customer_id of customers. The premise_id of customer_addresses is the foreign key of premise_id of premises. The customer_id of customer_orders is the foreign key of customer_id of customers. The mailshot_id of mailshot_customers is the foreign key of mailshot_id of mailshot_campaigns. The customer_id of mailshot_customers is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the names of customers having an order with shipping method FedEx and order status Paid.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where shipping_method_code = 'FedEx' and order_status_code = 'Paid'"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "How many courses are there in total?", "output": "select count(*) from course"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Count the number of courses.", "output": "select count(*) from course"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "How many courses have more than 2 credits?", "output": "select count(*) from course where credits > 2"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Count the number of courses with more than 2 credits.", "output": "select count(*) from course where credits > 2"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "List all names of courses with 1 credit?", "output": "select cname from course where credits = 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the names of courses with 1 credit?", "output": "select cname from course where credits = 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. The days contains values such as MTW. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Which courses are taught on days MTW?", "output": "select cname from course where days = \"MTW\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. The days contains values such as MTW. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the course names for courses taught on MTW?", "output": "select cname from course where days = \"MTW\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the number of departments in Division \"AS\"?", "output": "select count(*) from department where division = \"AS\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "How many departments are in the division AS?", "output": "select count(*) from department where division = \"AS\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the phones of departments in Room 268?", "output": "select dphone from department where room = 268"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Give the phones for departments in room 268.", "output": "select dphone from department where room = 268"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the number of students that have at least one grade \"B\".", "output": "select count(distinct stuid) from enrolled_in where grade = \"B\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "How many students have had at least one \"B\" grade?", "output": "select count(distinct stuid) from enrolled_in where grade = \"B\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the max and min grade point for all letter grade.", "output": "select max(gradepoint), min(gradepoint) from gradeconversion"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the maximum and minumum grade points?", "output": "select max(gradepoint), min(gradepoint) from gradeconversion"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the first names of students whose first names contain letter \"a\".", "output": "select distinct fname from student where fname like '%a%'"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the first names for students who have an \"a\" in their first name?", "output": "select distinct fname from student where fname like '%a%'"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The building contains values such as NEB. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as NEB. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the first names and last names of male (sex is M) faculties who live in building NEB.", "output": "select fname, lname from faculty where sex = \"M\" and building = \"NEB\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The building contains values such as NEB. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as NEB. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the full names of faculties with sex M and who live in building NEB?", "output": "select fname, lname from faculty where sex = \"M\" and building = \"NEB\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor.The building contains values such as NEB. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as NEB. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the rooms of faculties with rank professor who live in building NEB.", "output": "select room from faculty where rank = \"Professor\" and building = \"NEB\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor.The building contains values such as NEB. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as NEB. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the rooms for members of the faculty who are professors and who live in building NEB?", "output": "select room from faculty where rank = \"Professor\" and building = \"NEB\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as Mergenthaler. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the department name that is in Building \"Mergenthaler\".", "output": "select dname from department where building = \"Mergenthaler\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as Mergenthaler. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the name of the department in the Building Mergenthaler?", "output": "select dname from department where building = \"Mergenthaler\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "List all information about courses sorted by credits in the ascending order.", "output": "select * from course order by credits"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is all the information about courses, ordered by credits ascending?", "output": "select * from course order by credits"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "List the course name of courses sorted by credits.", "output": "select cname from course order by credits"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the course names, ordered by credits?", "output": "select cname from course order by credits"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the first name of students in the descending order of age.", "output": "select fname from student order by age desc"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the first names of students, ordered by age from greatest to least?", "output": "select fname from student order by age desc"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the last name of female (sex is F) students in the descending order of age.", "output": "select lname from student where sex = \"F\" order by age desc"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the last names of female students, ordered by age descending?", "output": "select lname from student where sex = \"F\" order by age desc"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The building contains values such as Barton. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as Barton. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the last names of faculties in building Barton in alphabetic order.", "output": "select lname from faculty where building = \"Barton\" order by lname"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The building contains values such as Barton. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as Barton. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the last names of faculty in building Barton, sorted by last name?", "output": "select lname from faculty where building = \"Barton\" order by lname"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the first names of faculties of rank Professor in alphabetic order.", "output": "select fname from faculty where rank = \"Professor\" order by fname"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the first names for all faculty professors, ordered by first name?", "output": "select fname from faculty where rank = \"Professor\" order by fname"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the name of the department that has the biggest number of students minored in?", "output": "select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno group by t2.dno order by count(*) desc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the name of the department with the most students minoring in it?", "output": "select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno group by t2.dno order by count(*) desc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the name of the department that has no students minored in?", "output": "select dname from department except select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the name of the department htat has no students minoring in it?", "output": "select dname from department except select t1.dname from department as t1 join minor_in as t2 on t1.dno = t2.dno"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the name of the department that has the fewest members.", "output": "select t1.dname from department as t1 join member_of as t2 on t1.dno = t2.dno group by t2.dno order by count(*) asc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the name of the department with the fewest members?", "output": "select t1.dname from department as t1 join member_of as t2 on t1.dno = t2.dno group by t2.dno order by count(*) asc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the rank of the faculty that the fewest faculties belong to.", "output": "select rank from faculty group by rank order by count(*) asc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the least common faculty rank?", "output": "select rank from faculty group by rank order by count(*) asc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the first and last names of the instructors who teach the top 3 number of courses?", "output": "select t2.fname, t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 3"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the full names of the 3 instructors who teach the most courses?", "output": "select t2.fname, t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 3"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Which building does the instructor who teaches the most number of courses live in?", "output": "select t2.building from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Give the building that the instructor who teaches the greatest number of courses lives in.", "output": "select t2.building from course as t1 join faculty as t2 on t1.instructor = t2.facid group by t1.instructor order by count(*) desc limit 1"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the name of courses that have at least five enrollments?", "output": "select t1.cname from course as t1 join enrolled_in as t2 on t1.cid = t2.cid group by t2.cid having count(*) >= 5"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Give the names of the courses with at least five enrollments.", "output": "select t1.cname from course as t1 join enrolled_in as t2 on t1.cid = t2.cid group by t2.cid having count(*) >= 5"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the first name and last name of the instructor of course that has course name", "output": "select t2.fname, t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid where t1.cname = \"COMPUTER LITERACY\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. The cname contains values such as COMPUTER LITERACY. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the full name of the instructor who has a course named COMPUTER LITERACY?", "output": "select t2.fname, t2.lname from course as t1 join faculty as t2 on t1.instructor = t2.facid where t1.cname = \"COMPUTER LITERACY\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The dname contains values such as Computer Science. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. The cname contains values such as INTRODUCTION TO COMPUTER SCIENCE. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.", "output": "select t2.dname, t2.room from course as t1 join department as t2 on t1.dno = t2.dno where t1.cname = \"INTRODUCTION to computer SCIENCE\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The dname contains values such as Computer Science. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. The cname contains values such as INTRODUCTION TO COMPUTER SCIENCE. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the department name and room for the course INTRODUCTION TO COMPUTER SCIENCE?", "output": "select t2.dname, t2.room from course as t1 join department as t2 on t1.dno = t2.dno where t1.cname = \"INTRODUCTION to computer SCIENCE\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the student first and last names and grade points of all enrollments.", "output": "select t3.fname, t3.lname, t2.gradepoint from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the full names and gradepoints for all enrollments?", "output": "select t3.fname, t3.lname, t2.gradepoint from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the distinct student first names of all students that have grade point at least 3.8 in one course.", "output": "select distinct t3.fname from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t2.gradepoint >= 3.8"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the distinct first names for students with a grade point of 3.8 or above in at least one course?", "output": "select distinct t3.fname from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t2.gradepoint >= 3.8"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the full names of faculties who are members of department with department number 520.", "output": "select t1.fname, t1.lname from faculty as t1 join member_of as t2 on t1.facid = t2.facid where t2.dno = 520"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the full names of faculty members who are a part of department 520?", "output": "select t1.fname, t1.lname from faculty as t1 join member_of as t2 on t1.facid = t2.facid where t2.dno = 520"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the first names and last names of the students that minor in the department with DNO 140.", "output": "select t2.fname, t2.lname from minor_in as t1 join student as t2 on t1.stuid = t2.stuid where t1.dno = 140"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the full names of students minoring in department 140?", "output": "select t2.fname, t2.lname from minor_in as t1 join student as t2 on t1.stuid = t2.stuid where t1.dno = 140"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The dname contains values such as Computer Science. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the last names of faculties who are members of computer science department.", "output": "select t2.lname from department as t1 join faculty as t2 on t1.dno = t3.dno join member_of as t3 on t2.facid = t3.facid where t1.dname = \"Computer Science\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The dname contains values such as Computer Science. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the last names of faculty who are part of the computer science department?", "output": "select t2.lname from department as t1 join faculty as t2 on t1.dno = t3.dno join member_of as t3 on t2.facid = t3.facid where t1.dname = \"Computer Science\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Smith. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the average grade point of student whose last name is Smith.", "output": "select avg(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.lname = \"Smith\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Smith. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the average gradepoint for students with the last name Smith?", "output": "select avg(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.lname = \"Smith\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as NYC. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What is the maximum and minimum grade point of students who live in NYC?", "output": "select max(t2.gradepoint), min(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.city_code = \"NYC\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as NYC. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Give the maximum and minimum gradepoints for students living in NYC?", "output": "select max(t2.gradepoint), min(t2.gradepoint) from enrolled_in as t1 join gradeconversion as t2 join student as t3 on t1.grade = t2.lettergrade and t1.stuid = t3.stuid where t3.city_code = \"NYC\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the names of courses that have either 3 credits or 1 credit but 4 hours.", "output": "select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the names of courses that give either 3 credits, or 1 credit and 4 hours?", "output": "select cname from course where credits = 3 union select cname from course where credits = 1 and hours = 4"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The building contains values such as NEB. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as NEB. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the names of departments that are either in division AS or in division EN and in Building NEB.", "output": "select dname from department where division = \"AS\" union select dname from department where division = \"EN\" and building = \"NEB\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The building contains values such as NEB. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. The building contains values such as NEB. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the names of departments either in division AS, or in division EN and in building NEB?", "output": "select dname from department where division = \"AS\" union select dname from department where division = \"EN\" and building = \"NEB\""}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "Find the first name of students not enrolled in any course.", "output": "select fname from student where stuid not in (select stuid from enrolled_in)"}, {"instruction": "college_3 contains tables such as student, faculty, department, member_of, course, minor_in, enrolled_in, gradeconversion. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. Table department has columns such as dno, division, dname, room, building, dphone. dno is the primary key. Table member_of has columns such as facid, dno, appt_type. is the primary key. Table course has columns such as cid, cname, credits, instructor, days, hours, dno. cid is the primary key. Table minor_in has columns such as stuid, dno. is the primary key. Table enrolled_in has columns such as stuid, cid, grade. is the primary key. Table gradeconversion has columns such as lettergrade, gradepoint. lettergrade is the primary key. The dno of member_of is the foreign key of dno of department. The facid of member_of is the foreign key of facid of faculty. The dno of course is the foreign key of dno of department. The instructor of course is the foreign key of facid of faculty. The dno of minor_in is the foreign key of dno of department. The stuid of minor_in is the foreign key of stuid of student. The grade of enrolled_in is the foreign key of lettergrade of gradeconversion. The cid of enrolled_in is the foreign key of cid of course. The stuid of enrolled_in is the foreign key of stuid of student.", "input": "What are the first names of all students that are not enrolled in courses?", "output": "select fname from student where stuid not in (select stuid from enrolled_in)"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the ids of the top three products that were purchased in the largest amount?", "output": "select product_id from product_suppliers order by total_amount_purchased desc limit 3"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Give the ids of the three products purchased in the largest amounts.", "output": "select product_id from product_suppliers order by total_amount_purchased desc limit 3"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the product id and product type of the cheapest product?", "output": "select product_id, product_type_code from products order by product_price limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Give the id and product type of the product with the lowest price.", "output": "select product_id, product_type_code from products order by product_price limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the number of different product types.", "output": "select count(distinct product_type_code) from products"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Count the number of distinct product types.", "output": "select count(distinct product_type_code) from products"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the address of customer 10.", "output": "select t1.address_details from addresses as t1 join customer_addresses as t2 on t1.address_id = t2.address_id where t2.customer_id = 10"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the address for the customer with id 10?", "output": "select t1.address_details from addresses as t1 join customer_addresses as t2 on t1.address_id = t2.address_id where t2.customer_id = 10"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The job_title_code contains values such as Department Manager. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the staff ids and genders of all staffs whose job title is Department Manager?", "output": "select t1.staff_id, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = \"Department Manager\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The job_title_code contains values such as Department Manager. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the staff ids and genders for any staff with the title Department Manager.", "output": "select t1.staff_id, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = \"Department Manager\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "For each payment method, return how many customers use it.", "output": "select payment_method_code, count(*) from customers group by payment_method_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "How many customers use each payment method?", "output": "select payment_method_code, count(*) from customers group by payment_method_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the id of the product that was ordered the most often?", "output": "select product_id from order_items group by product_id order by count(*) desc limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Give the product id for the product that was ordered most frequently.", "output": "select product_id from order_items group by product_id order by count(*) desc limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the name, phone number and email address of the customer who made the largest number of orders?", "output": "select t1.customer_name, t1.customer_phone, t1.customer_email from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id group by t2.customer_id order by count(*) desc limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the name, phone number and email address for the customer with the most orders.", "output": "select t1.customer_name, t1.customer_phone, t1.customer_email from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id group by t2.customer_id order by count(*) desc limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the average price for each type of product?", "output": "select product_type_code, avg(product_price) from products group by product_type_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the average price for each product type.", "output": "select product_type_code, avg(product_price) from products group by product_type_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. The dept_store_chain_name contains values such as South. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "How many department stores does the store chain South have?", "output": "select count(*) from department_stores as t1 join department_store_chain as t2 on t1.dept_store_chain_id = t2.dept_store_chain_id where t2.dept_store_chain_name = \"South\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. The dept_store_chain_name contains values such as South. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Count the number of stores the chain South has.", "output": "select count(*) from department_stores as t1 join department_store_chain as t2 on t1.dept_store_chain_id = t2.dept_store_chain_id where t2.dept_store_chain_name = \"South\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the name and job title of the staff who was assigned the latest?", "output": "select t1.staff_name, t2.job_title_code from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by t2.date_assigned_to desc limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the name and job title of the staff with the latest date assigned.", "output": "select t1.staff_name, t2.job_title_code from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by t2.date_assigned_to desc limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Give me the product type, name and price for all the products supplied by supplier id 3.", "output": "select t2.product_type_code, t2.product_name, t2.product_price from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 3"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the product type, name, and price for products supplied by supplier 3.", "output": "select t2.product_type_code, t2.product_name, t2.product_price from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 3"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Pending. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the distinct name of customers whose order status is Pending, in the order of customer id.", "output": "select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = \"Pending\" order by t2.customer_id"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Pending. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the distinct names of customers with an order status of Pending, sorted by customer id?", "output": "select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = \"Pending\" order by t2.customer_id"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Pending, New. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the name and address of the customers who have both New and Pending orders.", "output": "select t1.customer_name, t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = \"New\" intersect select t1.customer_name, t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = \"Pending\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Pending, New. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the names and addressed of customers who have both New and Pending orders?", "output": "select t1.customer_name, t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = \"New\" intersect select t1.customer_name, t1.customer_address from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = \"Pending\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.", "output": "select t1.product_id from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 2 and t2.product_price > (select avg(product_price) from products)"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the ids of products from the supplier with id 2, which are more expensive than the average price across all products?", "output": "select t1.product_id from product_suppliers as t1 join products as t2 on t1.product_id = t2.product_id where t1.supplier_id = 2 and t2.product_price > (select avg(product_price) from products)"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. The department_name contains values such as managing, marketing. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the id and name of the department store that has both marketing and managing department?", "output": "select t2.dept_store_id, t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = \"marketing\" intersect select t2.dept_store_id, t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = \"managing\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. The department_name contains values such as managing, marketing. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the ids and names of department stores with both marketing and managing departments?", "output": "select t2.dept_store_id, t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = \"marketing\" intersect select t2.dept_store_id, t2.store_name from departments as t1 join department_stores as t2 on t1.dept_store_id = t2.dept_store_id where t1.department_name = \"managing\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the ids of the two department store chains with the largest number of department stores?", "output": "select dept_store_chain_id from department_stores group by dept_store_chain_id order by count(*) desc limit 2"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the ids of the two department store chains with the most department stores.", "output": "select dept_store_chain_id from department_stores group by dept_store_chain_id order by count(*) desc limit 2"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the id of the department with the least number of staff?", "output": "select department_id from staff_department_assignments group by department_id order by count(*) limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the id of the department with the fewest staff assignments.", "output": "select department_id from staff_department_assignments group by department_id order by count(*) limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "For each product type, return the maximum and minimum price.", "output": "select product_type_code, max(product_price), min(product_price) from products group by product_type_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the maximum and minimum product prices for each product type?", "output": "select product_type_code, max(product_price), min(product_price) from products group by product_type_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the product type whose average price is higher than the average price of all products.", "output": "select product_type_code from products group by product_type_code having avg(product_price) > (select avg(product_price) from products)"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the code of the product type with an average price higher than the average price of all products?", "output": "select product_type_code from products group by product_type_code having avg(product_price) > (select avg(product_price) from products)"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the id and name of the staff who has been assigned for the shortest period.", "output": "select t1.staff_id, t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by date_assigned_to - date_assigned_from limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the id and name of the staff who has been assigned for the least amount of time?", "output": "select t1.staff_id, t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id order by date_assigned_to - date_assigned_from limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the names and ids of all products whose price is between 600 and 700.", "output": "select product_name, product_id from products where product_price between 600 and 700"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the names and ids of products costing between 600 and 700?", "output": "select product_name, product_id from products where product_price between 600 and 700"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Cancelled. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the ids of all distinct customers who made order after some orders that were Cancelled.", "output": "select distinct customer_id from customer_orders where order_date > (select min(order_date) from customer_orders where order_status_code = \"Cancelled\")"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Cancelled. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the distinct ids of customers who made an order after any order that was Cancelled?", "output": "select distinct customer_id from customer_orders where order_date > (select min(order_date) from customer_orders where order_status_code = \"Cancelled\")"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The job_title_code contains values such as Clerical Staff. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?", "output": "select staff_id from staff_department_assignments where date_assigned_to < (select max(date_assigned_to) from staff_department_assignments where job_title_code = 'Clerical Staff')"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The job_title_code contains values such as Clerical Staff. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.", "output": "select staff_id from staff_department_assignments where date_assigned_to < (select max(date_assigned_to) from staff_department_assignments where job_title_code = 'Clerical Staff')"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the names and ids of customers whose address contains TN?", "output": "select customer_name, customer_id from customers where customer_address like \"%tn%\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the names and ids of customers who have TN in their address.", "output": "select customer_name, customer_id from customers where customer_address like \"%tn%\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the name and gender of the staff who was assigned in 2016.", "output": "select t1.staff_name, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.date_assigned_from like \"2016%\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the names and genders of staff who were assigned in 2016?", "output": "select t1.staff_name, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.date_assigned_from like \"2016%\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "List the name of staff who has been assigned multiple jobs.", "output": "select t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id group by t2.staff_id having count (*) > 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the names of staff who have been assigned multiple jobs?", "output": "select t1.staff_name from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id group by t2.staff_id having count (*) > 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "List the name and phone number of all suppliers in the alphabetical order of their addresses.", "output": "select t1.supplier_name, t1.supplier_phone from suppliers as t1 join supplier_addresses as t2 on t1.supplier_id = t2.supplier_id join addresses as t3 on t2.address_id = t3.address_id order by t3.address_details"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?", "output": "select t1.supplier_name, t1.supplier_phone from suppliers as t1 join supplier_addresses as t2 on t1.supplier_id = t2.supplier_id join addresses as t3 on t2.address_id = t3.address_id order by t3.address_details"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the phone numbers of all customers and suppliers.", "output": "select customer_phone from customers union select supplier_phone from suppliers"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the phone numbers for all customers and suppliers.", "output": "select customer_phone from customers union select supplier_phone from suppliers"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the ids of all products that were ordered more than three times or supplied more than 80000.", "output": "select product_id from order_items group by product_id having count(*) > 3 union select product_id from product_suppliers group by product_id having sum(total_amount_purchased) > 80000"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the ids of all products that were either ordered more than 3 times or have a cumulative amount purchased of above 80000?", "output": "select product_id from order_items group by product_id having count(*) > 3 union select product_id from product_suppliers group by product_id having sum(total_amount_purchased) > 80000"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are id and name of the products whose price is lower than 600 or higher than 900?", "output": "select product_id, product_name from products where product_price < 600 or product_price > 900"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Give the ids and names of products with price lower than 600 or higher than 900.", "output": "select product_id, product_name from products where product_price < 600 or product_price > 900"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the id of suppliers whose average amount purchased for each product is above 50000 or below 30000.", "output": "select supplier_id from product_suppliers group by supplier_id having avg(total_amount_purchased) > 50000 or avg(total_amount_purchased) < 30000"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the ids of suppliers which have an average amount purchased of above 50000 or below 30000?", "output": "select supplier_id from product_suppliers group by supplier_id having avg(total_amount_purchased) > 50000 or avg(total_amount_purchased) < 30000"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the average amount purchased and value purchased for the supplier who supplies the most products.", "output": "select avg(total_amount_purchased), avg(total_value_purchased) from product_suppliers where supplier_id = (select supplier_id from product_suppliers group by supplier_id order by count(*) desc limit 1)"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.", "output": "select avg(total_amount_purchased), avg(total_value_purchased) from product_suppliers where supplier_id = (select supplier_id from product_suppliers group by supplier_id order by count(*) desc limit 1)"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the largest and smallest customer codes?", "output": "select max(customer_code), min(customer_code) from customers"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Return the maximum and minimum customer codes.", "output": "select max(customer_code), min(customer_code) from customers"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_name contains values such as keyboard. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "List the names of all the distinct customers who bought a keyboard.", "output": "select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_name = \"keyboard\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_name contains values such as keyboard. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the distinct names of customers who have purchased a keyboard?", "output": "select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_name = \"keyboard\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_name contains values such as red jeans. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "List the names and phone numbers of all the distinct suppliers who supply red jeans.", "output": "select distinct t1.supplier_name, t1.supplier_phone from suppliers as t1 join product_suppliers as t2 on t1.supplier_id = t2.supplier_id join products as t3 on t2.product_id = t3.product_id where t3.product_name = \"red jeans\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_name contains values such as red jeans. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the distinct names and phone numbers for suppliers who have red jeans?", "output": "select distinct t1.supplier_name, t1.supplier_phone from suppliers as t1 join product_suppliers as t2 on t1.supplier_id = t2.supplier_id join products as t3 on t2.product_id = t3.product_id where t3.product_name = \"red jeans\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?", "output": "select max(product_price), min(product_price), product_type_code from products group by product_type_code order by product_type_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Give the maximum and minimum product prices for each product type, grouped and ordered by product type.", "output": "select max(product_price), min(product_price), product_type_code from products group by product_type_code order by product_type_code"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Cancelled. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "List the order id, customer id for orders in Cancelled status, ordered by their order dates.", "output": "select order_id, customer_id from customer_orders where order_status_code = \"Cancelled\" order by order_date"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. The order_status_code contains values such as Cancelled. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?", "output": "select order_id, customer_id from customer_orders where order_status_code = \"Cancelled\" order by order_date"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the names of products that were bought by at least two distinct customers.", "output": "select distinct t3.product_name from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id join products as t3 on t2.product_id = t3.product_id group by t3.product_id having count (distinct t1.customer_id) >= 2"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the distinct names of products purchased by at least two different customers?", "output": "select distinct t3.product_name from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id join products as t3 on t2.product_id = t3.product_id group by t3.product_id having count (distinct t1.customer_id) >= 2"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the names of customers who have bought by at least three distinct products.", "output": "select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_id having count (distinct t3.product_id) >= 3"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the distinct names of customers who have purchased at least three different products?", "output": "select distinct t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_id having count (distinct t3.product_id) >= 3"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The job_title_code contains values such as Clerical Staff, Sales Person. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.", "output": "select t1.staff_name, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = \"Sales Person\" except select t1.staff_name, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = \"Clerical Staff\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The job_title_code contains values such as Clerical Staff, Sales Person. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the names and genders of staff who have held the title Sales Person, but never Clerical Staff?", "output": "select t1.staff_name, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = \"Sales Person\" except select t1.staff_name, t1.staff_gender from staff as t1 join staff_department_assignments as t2 on t1.staff_id = t2.staff_id where t2.job_title_code = \"Clerical Staff\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. The payment_method_code contains values such as Credit Card. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the id and name of customers whose address contains WY state and do not use credit card for payment.", "output": "select customer_id, customer_name from customers where customer_address like \"%wy%\" and payment_method_code != \"Credit Card\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. The payment_method_code contains values such as Credit Card. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What are the ids and names of customers with addressed that contain WY and who do not use a credit card for payment?", "output": "select customer_id, customer_name from customers where customer_address like \"%wy%\" and payment_method_code != \"Credit Card\""}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_type_code contains values such as Clothes. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the average price of all product clothes.", "output": "select avg(product_price) from products where product_type_code = 'Clothes'"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_type_code contains values such as Clothes. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the average price of clothes?", "output": "select avg(product_price) from products where product_type_code = 'Clothes'"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_type_code contains values such as Hardware. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "Find the name of the most expensive hardware product.", "output": "select product_name from products where product_type_code = 'Hardware' order by product_price desc limit 1"}, {"instruction": "department_store contains tables such as addresses, staff, suppliers, department_store_chain, customers, products, supplier_addresses, customer_addresses, customer_orders, department_stores, departments, order_items, product_suppliers, staff_department_assignments. Table addresses has columns such as address_id, address_details. address_id is the primary key. Table staff has columns such as staff_id, staff_gender, staff_name. staff_id is the primary key. Table suppliers has columns such as supplier_id, supplier_name, supplier_phone. supplier_id is the primary key. Table department_store_chain has columns such as dept_store_chain_id, dept_store_chain_name. dept_store_chain_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_code, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. The product_type_code contains values such as Hardware. Table supplier_addresses has columns such as supplier_id, address_id, date_from, date_to. supplier_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_from, date_to. customer_id is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status_code, order_date. order_id is the primary key. Table department_stores has columns such as dept_store_id, dept_store_chain_id, store_name, store_address, store_phone, store_email. dept_store_id is the primary key. Table departments has columns such as department_id, dept_store_id, department_name. department_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id. order_item_id is the primary key. Table product_suppliers has columns such as product_id, supplier_id, date_supplied_from, date_supplied_to, total_amount_purchased, total_value_purchased. product_id is the primary key. Table staff_department_assignments has columns such as staff_id, department_id, date_assigned_from, job_title_code, date_assigned_to. staff_id is the primary key. The supplier_id of supplier_addresses is the foreign key of supplier_id of suppliers. The address_id of supplier_addresses is the foreign key of address_id of addresses. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_orders is the foreign key of customer_id of customers. The dept_store_chain_id of department_stores is the foreign key of dept_store_chain_id of department_store_chain. The dept_store_id of departments is the foreign key of dept_store_id of department_stores. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of product_suppliers is the foreign key of product_id of products. The supplier_id of product_suppliers is the foreign key of supplier_id of suppliers. The staff_id of staff_department_assignments is the foreign key of staff_id of staff. The department_id of staff_department_assignments is the foreign key of department_id of departments.", "input": "What is the name of the hardware product with the greatest price?", "output": "select product_name from products where product_type_code = 'Hardware' order by product_price desc limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "How many aircrafts are there?", "output": "select count(*) from aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the number of aircraft?", "output": "select count(*) from aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List the description of all aircrafts.", "output": "select description from aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the descriptions for the aircrafts?", "output": "select description from aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the average number of international passengers of all airports?", "output": "select avg(international_passengers) from airport"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the average number of international passengers for an airport?", "output": "select avg(international_passengers) from airport"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the number of international and domestic passengers of the airport named London \"Heathrow\"?", "output": "select international_passengers, domestic_passengers from airport where airport_name = \"London Heathrow\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. The airport_name contains values such as London Heathrow. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "How many international and domestic passengers are there in the airport London Heathrow?", "output": "select international_passengers, domestic_passengers from airport where airport_name = \"London Heathrow\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the total number of Domestic Passengers of airports that contain the word \"London\".", "output": "select sum(domestic_passengers) from airport where airport_name like \"%london%\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the total number of domestic passengers at all London airports?", "output": "select sum(domestic_passengers) from airport where airport_name like \"%london%\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the maximum and minimum number of transit passengers of all aiports.", "output": "select max(transit_passengers), min(transit_passengers) from airport"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the maximum and mininum number of transit passengers for all airports?", "output": "select max(transit_passengers), min(transit_passengers) from airport"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the name of pilots aged 25 or older?", "output": "select name from pilot where age >= 25"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "what is the name of every pilot who is at least 25 years old?", "output": "select name from pilot where age >= 25"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List all pilot names in ascending alphabetical order.", "output": "select name from pilot order by name asc"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of the pilots in alphabetical order?", "output": "select name from pilot order by name asc"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List names of all pilot aged 30 or younger in descending alphabetical order.", "output": "select name from pilot where age <= 30 order by name desc"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of all pilots 30 years old or young in descending alphabetical order?", "output": "select name from pilot where age <= 30 order by name desc"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. The airport_name contains values such as London Gatwick. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "Please show the names of aircrafts associated with airport with name \"London Gatwick\".", "output": "select t1.aircraft from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.airport_name = \"London Gatwick\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. The airport_name contains values such as London Gatwick. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of all the aircrafts associated with London Gatwick airport?", "output": "select t1.aircraft from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.airport_name = \"London Gatwick\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.", "output": "select t1.aircraft, t1.description from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.total_passengers > 10000000"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?", "output": "select t1.aircraft, t1.description from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.total_passengers > 10000000"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. The aircraft contains values such as Robinson R-22. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the average total number of passengers of airports that are associated with aircraft \"Robinson R-22\"?", "output": "select avg(t3.total_passengers) from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t1.aircraft = \"Robinson r-22\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. The aircraft contains values such as Robinson R-22. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the average total number of passengers for all airports that the aircraft \"Robinson R-22\" visits?", "output": "select avg(t3.total_passengers) from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t1.aircraft = \"Robinson r-22\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "Please list the location and the winning aircraft name.", "output": "select t2.location, t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the location and name of the winning aircraft?", "output": "select t2.location, t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List the name of the aircraft that has been named winning aircraft the most number of times.", "output": "select t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft order by count(*) desc limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the name of the aircraft that has won an award the most?", "output": "select t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft order by count(*) desc limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List the names of aircrafts and the number of times it won matches.", "output": "select t1.aircraft, count(*) from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "For each aircraft that has won an award, what is its name and how many time has it won?", "output": "select t1.aircraft, count(*) from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List names of all pilot in descending order of age.", "output": "select name from pilot order by age desc"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of all pilots listed by descending age?", "output": "select name from pilot order by age desc"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List the names of aircrafts and that won matches at least twice.", "output": "select t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft having count(*) >= 2"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of all aircrafts that have won a match at least twice?", "output": "select t1.aircraft from aircraft as t1 join match as t2 on t1.aircraft_id = t2.winning_aircraft group by t2.winning_aircraft having count(*) >= 2"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "List the names of aircrafts and that did not win any match.", "output": "select aircraft from aircraft where aircraft_id not in (select winning_aircraft from match)"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of all aicrafts that have never won any match?", "output": "select aircraft from aircraft where aircraft_id not in (select winning_aircraft from match)"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. The airport_name contains values such as London Heathrow, London Gatwick. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "Show the names of aircrafts that are associated with both an airport named \"London Heathrow\" and an airport named \"London Gatwick\"", "output": "select t1.aircraft from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.airport_name = \"London Heathrow\" intersect select t1.aircraft from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.airport_name = \"London Gatwick\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. The airport_name contains values such as London Heathrow. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?", "output": "select t1.aircraft from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.airport_name = \"London Heathrow\" intersect select t1.aircraft from aircraft as t1 join airport_aircraft as t2 on t1.aircraft_id = t2.aircraft_id join airport as t3 on t2.airport_id = t3.airport_id where t3.airport_name = \"London Gatwick\""}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "Show all information on the airport that has the largest number of international passengers.", "output": "select * from airport order by international_passengers desc limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is all the information on the airport with the largest number of international passengers?", "output": "select * from airport order by international_passengers desc limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.", "output": "select t1.name, t1.age from pilot as t1 join match as t2 on t1.pilot_id = t2.winning_pilot where t1.age < 30 group by t2.winning_pilot order by count(*) desc limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What is the name and age of the pilot younger than 30 who has won the most number of times?", "output": "select t1.name, t1.age from pilot as t1 join match as t2 on t1.pilot_id = t2.winning_pilot where t1.age < 30 group by t2.winning_pilot order by count(*) desc limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "what is the name and age of the youngest winning pilot?", "output": "select t1.name, t1.age from pilot as t1 join match as t2 on t1.pilot_id = t2.winning_pilot order by t1.age limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "How old is the youngest winning pilot and what is their name?", "output": "select t1.name, t1.age from pilot as t1 join match as t2 on t1.pilot_id = t2.winning_pilot order by t1.age limit 1"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. The country contains values such as Australia. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "find the name of pilots who did not win the matches held in the country of Australia.", "output": "select name from pilot where pilot_id not in (select winning_pilot from match where country = 'Australia')"}, {"instruction": "aircraft contains tables such as pilot, aircraft, match, airport, airport_aircraft. Table pilot has columns such as pilot_id, name, age. pilot_id is the primary key. Table aircraft has columns such as aircraft_id, aircraft, description, max_gross_weight, total_disk_area, max_disk_loading. aircraft_id is the primary key. Table match has columns such as round, location, country, date, fastest_qualifying, winning_pilot, winning_aircraft. round is the primary key. The country contains values such as Australia. Table airport has columns such as airport_id, airport_name, total_passengers, %_change_2007, international_passengers, domestic_passengers, transit_passengers, aircraft_movements, freight_metric_tonnes. airport_id is the primary key. Table airport_aircraft has columns such as id, airport_id, aircraft_id. airport_id is the primary key. The winning_pilot of match is the foreign key of pilot_id of pilot. The winning_aircraft of match is the foreign key of aircraft_id of aircraft. The aircraft_id of airport_aircraft is the foreign key of aircraft_id of aircraft. The airport_id of airport_aircraft is the foreign key of airport_id of airport.", "input": "What are the names of the pilots that have not won any matches in Australia?", "output": "select name from pilot where pilot_id not in (select winning_pilot from match where country = 'Australia')"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "How many residents does each property have? List property id and resident count.", "output": "select t1.property_id, count(*) from properties as t1 join residents as t2 on t1.property_id = t2.property_id group by t1.property_id"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. The organization_details contains values such as Denesik and Sons Party. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "What is the distinct service types that are provided by the organization which has detail 'Denesik and Sons Party'?", "output": "select distinct t1.service_type_code from services as t1 join organizations as t2 on t1.organization_id = t2.organization_id where t2.organization_details = 'Denesik and sons Party'"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "How many services has each resident requested? List the resident id, details, and the count in descending order of the count.", "output": "select t1.resident_id, t1.other_details, count(*) from residents as t1 join residents_services as t2 on t1.resident_id = t2.resident_id group by t1.resident_id order by count(*) desc"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "What is the maximum number that a certain service is provided? List the service id, details and number.", "output": "select t1.service_id, t1.service_details, count(*) from services as t1 join residents_services as t2 on t1.service_id = t2.service_id group by t1.service_id order by count(*) desc limit 1"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "List the id and type of each thing, and the details of the organization that owns it.", "output": "select t1.thing_id, t1.type_of_thing_code, t2.organization_details from things as t1 join organizations as t2 on t1.organization_id = t2.organization_id"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "What are the id and details of the customers who have at least 3 events?", "output": "select t1.customer_id, t1.customer_details from customers as t1 join customer_events as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) >= 3"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "What is each customer's move in date, and the corresponding customer id and details?", "output": "select t2.date_moved_in, t1.customer_id, t1.customer_details from customers as t1 join customer_events as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "Which events have the number of notes between one and three? List the event id and the property id.", "output": "select t1.customer_event_id, t1.property_id from customer_events as t1 join customer_event_notes as t2 on t1.customer_event_id = t2.customer_event_id group by t1.customer_event_id having count(*) between 1 and 3"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. The date_and_date contains values such as 2017-06-19 02:59:21.The status_of_thing_code contains values such as Close. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "What are the distinct id and type of the thing that has the status 'Close' or has a status record before the date '2017-06-19 02:59:21'", "output": "select distinct t2.thing_id, t2.type_of_thing_code from timed_status_of_things as t1 join things as t2 on t1.thing_id = t2.thing_id where t1.status_of_thing_code = 'Close' or t1.date_and_date < '2017-06-19 02:59:21'"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. The service_details contains values such as Unsatisfied. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. The other_details contains values such as Unsatisfied. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. The service_details contains values such as Unsatisfied. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "How many distinct locations have the things with service detail 'Unsatisfied' been located in?", "output": "select count(distinct t2.location_code) from things as t1 join timed_locations_of_things as t2 on t1.thing_id = t2.thing_id where t1.service_details = 'Unsatisfied'"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "How many different status codes of things are there?", "output": "select count(distinct status_of_thing_code) from timed_status_of_things"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "Which organizations are not a parent organization of others? List the organization id.", "output": "select organization_id from organizations except select parent_organization_id from organizations"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "When is the last day any resident moved in?", "output": "select max(date_moved_in) from residents"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "What are the resident details containing the substring 'Miss'?", "output": "select other_details from residents where other_details like '%miss%'"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "List the customer event id and the corresponding move in date and property id.", "output": "select customer_event_id, date_moved_in, property_id from customer_events"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "How many customers did not have any event?", "output": "select count(*) from customers where customer_id not in ( select customer_id from customer_events )"}, {"instruction": "local_govt_and_lot contains tables such as customers, properties, residents, organizations, services, residents_services, things, customer_events, customer_event_notes, timed_status_of_things, timed_locations_of_things. Table customers has columns such as customer_id, customer_details. customer_id is the primary key. Table properties has columns such as property_id, property_type_code, property_address, other_details. property_id is the primary key. Table residents has columns such as resident_id, property_id, date_moved_in, date_moved_out, other_details. resident_id is the primary key. Table organizations has columns such as organization_id, parent_organization_id, organization_details. organization_id is the primary key. Table services has columns such as service_id, organization_id, service_type_code, service_details. service_id is the primary key. Table residents_services has columns such as resident_id, service_id, date_moved_in, property_id, date_requested, date_provided, other_details. resident_id is the primary key. Table things has columns such as thing_id, organization_id, type_of_thing_code, service_type_code, service_details. thing_id is the primary key. Table customer_events has columns such as customer_event_id, customer_id, date_moved_in, property_id, resident_id, thing_id. customer_event_id is the primary key. Table customer_event_notes has columns such as customer_event_note_id, customer_event_id, service_type_code, resident_id, property_id, date_moved_in. customer_event_note_id is the primary key. Table timed_status_of_things has columns such as thing_id, date_and_date, status_of_thing_code. thing_id is the primary key. Table timed_locations_of_things has columns such as thing_id, date_and_time, location_code. thing_id is the primary key. The property_id of residents is the foreign key of property_id of properties. The organization_id of services is the foreign key of organization_id of organizations. The resident_id of residents_services is the foreign key of resident_id of residents. The property_id of residents_services is the foreign key of property_id of residents. The date_moved_in of residents_services is the foreign key of date_moved_in of residents. The service_id of residents_services is the foreign key of service_id of services. The organization_id of things is the foreign key of organization_id of organizations. The resident_id of customer_events is the foreign key of resident_id of residents. The property_id of customer_events is the foreign key of property_id of residents. The date_moved_in of customer_events is the foreign key of date_moved_in of residents. The customer_id of customer_events is the foreign key of customer_id of customers. The thing_id of customer_events is the foreign key of thing_id of things. The customer_event_id of customer_event_notes is the foreign key of customer_event_id of customer_events. The thing_id of timed_status_of_things is the foreign key of thing_id of things. The thing_id of timed_locations_of_things is the foreign key of thing_id of things.", "input": "What are the distinct move in dates of the residents?", "output": "select distinct date_moved_in from residents"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "How many schools are there?", "output": "select count(*) from school"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Count the number of schools.", "output": "select count(*) from school"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "List the locations of schools in ascending order of enrollment.", "output": "select location from school order by enrollment asc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What is the list of school locations sorted in ascending order of school enrollment?", "output": "select location from school order by enrollment asc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "List the locations of schools in descending order of founded year.", "output": "select location from school order by founded desc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What is the list of school locations sorted in descending order of school foundation year?", "output": "select location from school order by founded desc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. The denomination contains values such as Catholic. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the enrollments of schools whose denomination is not \"Catholic\"?", "output": "select enrollment from school where denomination != \"Catholic\""}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. The denomination contains values such as Catholic. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "List the enrollment for each school that does not have \"Catholic\" as denomination.", "output": "select enrollment from school where denomination != \"Catholic\""}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What is the average enrollment of schools?", "output": "select avg(enrollment) from school"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Take the average of the school enrollment.", "output": "select avg(enrollment) from school"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the teams of the players, sorted in ascending alphabetical order?", "output": "select team from player order by team asc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Find the team of each player and sort them in ascending alphabetical order.", "output": "select team from player order by team asc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "How many different positions of players are there?", "output": "select count(distinct position) from player"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Count the number of distinct player positions.", "output": "select count(distinct position) from player"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Find the team of the player of the highest age.", "output": "select team from player order by age desc limit 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Which team has the oldest player?", "output": "select team from player order by age desc limit 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "List the teams of the players with the top 5 largest ages.", "output": "select team from player order by age desc limit 5"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the teams that have the 5 oldest players?", "output": "select team from player order by age desc limit 5"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "For each player, show the team and the location of school they belong to.", "output": "select t1.team, t2.location from player as t1 join school as t2 on t1.school_id = t2.school_id"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the team and the location of school each player belongs to?", "output": "select t1.team, t2.location from player as t1 join school as t2 on t1.school_id = t2.school_id"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Show the locations of schools that have more than 1 player.", "output": "select t2.location from player as t1 join school as t2 on t1.school_id = t2.school_id group by t1.school_id having count(*) > 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Which schools have more than 1 player? Give me the school locations.", "output": "select t2.location from player as t1 join school as t2 on t1.school_id = t2.school_id group by t1.school_id having count(*) > 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Show the denomination of the school that has the most players.", "output": "select t2.denomination from player as t1 join school as t2 on t1.school_id = t2.school_id group by t1.school_id order by count(*) desc limit 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What is the denomination of the school the most players belong to?", "output": "select t2.denomination from player as t1 join school as t2 on t1.school_id = t2.school_id group by t1.school_id order by count(*) desc limit 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Show locations and nicknames of schools.", "output": "select t1.location, t2.nickname from school as t1 join school_details as t2 on t1.school_id = t2.school_id"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the location and nickname of each school?", "output": "select t1.location, t2.nickname from school as t1 join school_details as t2 on t1.school_id = t2.school_id"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Please show different denominations and the corresponding number of schools.", "output": "select denomination, count(*) from school group by denomination"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "For each denomination, return the denomination and the count of schools with that denomination.", "output": "select denomination, count(*) from school group by denomination"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Please show different denominations and the corresponding number of schools in descending order.", "output": "select denomination, count(*) from school group by denomination order by count(*) desc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.", "output": "select denomination, count(*) from school group by denomination order by count(*) desc"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "List the school color of the school that has the largest enrollment.", "output": "select school_colors from school order by enrollment desc limit 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What is the school color of the school with the largest enrollment?", "output": "select school_colors from school order by enrollment desc limit 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "List the locations of schools that do not have any player.", "output": "select location from school where school_id not in (select school_id from player)"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Which schools do not have any player? Give me the school locations.", "output": "select location from school where school_id not in (select school_id from player)"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Show the denomination shared by schools founded before 1890 and schools founded after 1900", "output": "select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the denominations used by both schools founded before 1890 and schools founded after 1900?", "output": "select denomination from school where founded < 1890 intersect select denomination from school where founded > 1900"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. The division contains values such as Division 1, Division 2. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Show the nicknames of schools that are not in division 1.", "output": "select nickname from school_details where division != \"Division 1\""}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. The division contains values such as Division 2. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the nicknames of schools whose division is not 1?", "output": "select nickname from school_details where division != \"Division 1\""}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "Show the denomination shared by more than one school.", "output": "select denomination from school group by denomination having count(*) > 1"}, {"instruction": "school_player contains tables such as school, school_details, school_performance, player. Table school has columns such as school_id, school, location, enrollment, founded, denomination, boys_or_girls, day_or_boarding, year_entered_competition, school_colors. school_id is the primary key. Table school_details has columns such as school_id, nickname, colors, league, class, division. school_id is the primary key. Table school_performance has columns such as school_id, school_year, class_a, class_aa. school_id is the primary key. Table player has columns such as player_id, player, team, age, position, school_id. player_id is the primary key. The school_id of school_details is the foreign key of school_id of school. The school_id of school_performance is the foreign key of school_id of school. The school_id of player is the foreign key of school_id of school.", "input": "What are the denomination more than one school have?", "output": "select denomination from school group by denomination having count(*) > 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find all the distinct district names ordered by city area in descending.", "output": "select distinct district_name from district order by city_area desc"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the different district names in order of descending city area?", "output": "select distinct district_name from district order by city_area desc"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the list of page size which have more than 3 product listed", "output": "select max_page_size from product group by max_page_size having count(*) > 3"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the maximum page size for everything that has more than 3 products listed?", "output": "select max_page_size from product group by max_page_size having count(*) > 3"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the name and population of district with population between 200000 and 2000000", "output": "select district_name, city_population from district where city_population between 200000 and 2000000"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?", "output": "select district_name, city_population from district where city_population between 200000 and 2000000"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the name all districts with city area greater than 10 or population larger than 100000", "output": "select district_name from district where city_area > 10 or city_population > 100000"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the names of all districts with a city area greater than 10 or have more than 100000 people living there?", "output": "select district_name from district where city_area > 10 or city_population > 100000"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Which district has the largest population?", "output": "select district_name from district order by city_population desc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the name of the district with the most residents?", "output": "select district_name from district order by city_population desc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Which district has the least area?", "output": "select district_name from district order by city_area asc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the name of the district with the smallest area?", "output": "select district_name from district order by city_area asc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the total population of the top 3 districts with the largest area.", "output": "select sum(city_population) from district order by city_area desc limit 3"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the total number of residents for the districts with the 3 largest areas?", "output": "select sum(city_population) from district order by city_area desc limit 3"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find all types of store and number of them.", "output": "select type, count(*) from store group by type"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "For each type of store, how many of them are there?", "output": "select type, count(*) from store group by type"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. The district_name contains values such as Khanewal District. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the names of all stores in Khanewal District.", "output": "select t1.store_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t3.district_name = \"Khanewal District\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. The district_name contains values such as Khanewal District. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the names of all the stores located in Khanewal District?", "output": "select t1.store_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t3.district_name = \"Khanewal District\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find all the stores in the district with the most population.", "output": "select t1.store_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id where district_id = (select district_id from district order by city_population desc limit 1)"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the names of all the stores in the largest district by population?", "output": "select t1.store_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id where district_id = (select district_id from district order by city_population desc limit 1)"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. The store_name contains values such as Blackville. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Which city is the headquarter of the store named \"Blackville\" in?", "output": "select t3.headquartered_city from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t1.store_name = \"Blackville\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. The store_name contains values such as Blackville. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What city is the headquarter of the store Blackville?", "output": "select t3.headquartered_city from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t1.store_name = \"Blackville\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the number of stores in each city.", "output": "select t3.headquartered_city, count(*) from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id group by t3.headquartered_city"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "How many stores are headquarted in each city?", "output": "select t3.headquartered_city, count(*) from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id group by t3.headquartered_city"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the city with the most number of stores.", "output": "select t3.headquartered_city from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id group by t3.headquartered_city order by count(*) desc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the city with the most number of flagship stores?", "output": "select t3.headquartered_city from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id group by t3.headquartered_city order by count(*) desc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the average pages per minute color?", "output": "select avg(pages_per_minute_color) from product"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the average number of pages per minute color?", "output": "select avg(pages_per_minute_color) from product"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. The store_name contains values such as Miramichi. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What products are available at store named \"Miramichi\"?", "output": "select t1.product from product as t1 join store_product as t2 on t1.product_id = t2.product_id join store as t3 on t2.store_id = t3.store_id where t3.store_name = \"Miramichi\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. The store_name contains values such as Miramichi. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What products are sold at the store named Miramichi?", "output": "select t1.product from product as t1 join store_product as t2 on t1.product_id = t2.product_id join store as t3 on t2.store_id = t3.store_id where t3.store_name = \"Miramichi\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. The max_page_size contains values such as A4. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find products with max page size as \"A4\" and pages per minute color smaller than 5.", "output": "select product from product where max_page_size = \"A4\" and pages_per_minute_color < 5"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. The max_page_size contains values such as A4. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the products with the maximum page size A4 that also have a pages per minute color smaller than 5?", "output": "select product from product where max_page_size = \"A4\" and pages_per_minute_color < 5"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. The max_page_size contains values such as A4. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find products with max page size as \"A4\" or pages per minute color smaller than 5.", "output": "select product from product where max_page_size = \"A4\" or pages_per_minute_color < 5"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. The max_page_size contains values such as A4. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?", "output": "select product from product where max_page_size = \"A4\" or pages_per_minute_color < 5"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find all the product whose name contains the word \"Scanner\".", "output": "select product from product where product like \"%scanner%\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are all of the products whose name includes the substring \"Scanner\"?", "output": "select product from product where product like \"%scanner%\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the most prominent max page size among all the products.", "output": "select max_page_size from product group by max_page_size order by count(*) desc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the most common maximum page size?", "output": "select max_page_size from product group by max_page_size order by count(*) desc limit 1"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the name of the products that are not using the most frequently-used max page size.", "output": "select product from product where product != (select max_page_size from product group by max_page_size order by count(*) desc limit 1)"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the names of all products that are not the most frequently-used maximum page size?", "output": "select product from product where product != (select max_page_size from product group by max_page_size order by count(*) desc limit 1)"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the total population of the districts where the area is bigger than the average city area.", "output": "select sum(city_population) from district where city_area > (select avg(city_area) from district)"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What is the total population for all the districts that have an area larger tahn the average city area?", "output": "select sum(city_population) from district where city_area > (select avg(city_area) from district)"}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. The type contains values such as Village Store, City Mall. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "Find the names of districts where have both city mall and village store type stores.", "output": "select t3.district_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t1.type = \"City Mall\" intersect select t3.district_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t1.type = \"Village Store\""}, {"instruction": "store_product contains tables such as product, store, district, store_product, store_district. Table product has columns such as product_id, product, dimensions, dpi, pages_per_minute_color, max_page_size, interface. product_id is the primary key. Table store has columns such as store_id, store_name, type, area_size, number_of_product_category, ranking. store_id is the primary key. The type contains values such as Village Store. Table district has columns such as district_id, district_name, headquartered_city, city_population, city_area. district_id is the primary key. Table store_product has columns such as store_id, product_id. store_id is the primary key. Table store_district has columns such as store_id, district_id. store_id is the primary key. The store_id of store_product is the foreign key of store_id of store. The district_id of store_district is the foreign key of district_id of district. The store_id of store_district is the foreign key of store_id of store.", "input": "What are the names of the districts that have both mall and village store style shops?", "output": "select t3.district_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t1.type = \"City Mall\" intersect select t3.district_name from store as t1 join store_district as t2 on t1.store_id = t2.store_id join district as t3 on t2.district_id = t3.district_id where t1.type = \"Village Store\""}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the total enrollment number of all colleges?", "output": "select sum(enr) from college"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many students are enrolled in college?", "output": "select sum(enr) from college"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the average enrollment number?", "output": "select avg(enr) from college"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many students, on average, does each college have enrolled?", "output": "select avg(enr) from college"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many colleges in total?", "output": "select count(*) from college"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many different colleges are there?", "output": "select count(*) from college"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many players have more than 1000 hours of training?", "output": "select count(*) from player where hs > 1000"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many different players trained for more than 1000 hours?", "output": "select count(*) from player where hs > 1000"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many colleges has more than 15000 students?", "output": "select count(*) from college where enr > 15000"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the number of colleges with a student population greater than 15000?", "output": "select count(*) from college where enr > 15000"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the average training hours of all players?", "output": "select avg(hs) from player"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many hours do the players train on average?", "output": "select avg(hs) from player"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name and training hours of players whose hours are below 1500.", "output": "select pname, hs from player where hs < 1500"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names and number of hours spent training for each player who trains for less than 1500 hours?", "output": "select pname, hs from player where hs < 1500"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many different colleges do attend the tryout test?", "output": "select count(distinct cname) from tryout"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many different colleges were represented at tryouts?", "output": "select count(distinct cname) from tryout"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the unique types of player positions in the tryout?", "output": "select count(distinct ppos) from tryout"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the different types of player positions?", "output": "select count(distinct ppos) from tryout"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many students got accepted after the tryout?", "output": "select count(*) from tryout where decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many students received a yes from tryouts?", "output": "select count(*) from tryout where decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many students whose are playing the role of goalie?", "output": "select count(*) from tryout where ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the number of students playing as a goalie?", "output": "select count(*) from tryout where ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the max, average and min training hours of all players.", "output": "select avg(hs), max(hs), min(hs) from player"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the average, maximum, and minimum for the number of hours spent training?", "output": "select avg(hs), max(hs), min(hs) from player"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. The state contains values such as FL. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is average enrollment of colleges in the state FL?", "output": "select avg(enr) from college where state = 'FL'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is average number of students enrolled in Florida colleges?", "output": "select avg(enr) from college where state = 'FL'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of players whose training hours is between 500 and 1500?", "output": "select pname from player where hs between 500 and 1500"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of players who train between 500 and 1500 hours?", "output": "select pname from player where hs between 500 and 1500"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the players whose names contain letter 'a'.", "output": "select distinct pname from player where pname like '%a%'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Who are the players that have names containing the letter a?", "output": "select distinct pname from player where pname like '%a%'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. The state contains values such as LA. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.", "output": "select cname, enr from college where enr > 10000 and state = \"LA\""}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names and enrollment numbers for colleges that have more than 10000 enrolled and are located in Louisiana?", "output": "select cname, enr from college where enr > 10000 and state = \"LA\""}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "List all information about college sorted by enrollment number in the ascending order.", "output": "select * from college order by enr"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What information do you have on colleges sorted by increasing enrollment numbers?", "output": "select * from college order by enr"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "List the name of the colleges whose enrollment is greater 18000 sorted by the college's name.", "output": "select cname from college where enr > 18000 order by cname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the name of every college in alphabetical order that has more than 18000 students enrolled?", "output": "select cname from college where enr > 18000 order by cname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name of players whose card is yes in the descending order of training hours.", "output": "select pname from player where ycard = 'yes' order by hs desc"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the name of the players who received a card in descending order of the hours of training?", "output": "select pname from player where ycard = 'yes' order by hs desc"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name of different colleges involved in the tryout in alphabetical order.", "output": "select distinct cname from tryout order by cname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the different names of the colleges involved in the tryout in alphabetical order?", "output": "select distinct cname from tryout order by cname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Which position is most popular among players in the tryout?", "output": "select ppos from tryout group by ppos order by count(*) desc limit 1"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What was the most popular position at tryouts?", "output": "select ppos from tryout group by ppos order by count(*) desc limit 1"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the number of students who participate in the tryout for each college ordered by descending count.", "output": "select count(*), cname from tryout group by cname order by count(*) desc"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many students participated in tryouts for each college by descennding count?", "output": "select count(*), cname from tryout group by cname order by count(*) desc"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is minimum hours of the students playing in different position?", "output": "select min(t2.hs), t1.ppos from tryout as t1 join player as t2 on t1.pid = t2.pid group by t1.ppos"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "For each position, what is the minimum time students spent practicing?", "output": "select min(t2.hs), t1.ppos from tryout as t1 join player as t2 on t1.pid = t2.pid group by t1.ppos"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of schools with the top 3 largest size?", "output": "select cname from college order by enr desc limit 3"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of the schools with the top 3 largest class sizes?", "output": "select cname from college order by enr desc limit 3"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the name of school that has the smallest enrollment in each state?", "output": "select cname, state, min(enr) from college group by state"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the name of the school with smallest enrollment size per state?", "output": "select cname, state, min(enr) from college group by state"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the states where have some college students in tryout.", "output": "select distinct state from college as t1 join tryout as t2 on t1.cname = t2.cname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the different states that have students trying out?", "output": "select distinct state from college as t1 join tryout as t2 on t1.cname = t2.cname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the states where have some college students in tryout and their decisions are yes.", "output": "select distinct t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the different states that had students successfully try out?", "output": "select distinct t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name and college of students whose decisions are yes in the tryout.", "output": "select t1.pname, t2.cname from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of all the players who received a yes during tryouts, and also what are the names of their colleges?", "output": "select t1.pname, t2.cname from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name of all students who were in the tryout sorted in alphabetic order.", "output": "select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid order by t1.pname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of all students who tried out in alphabetical order?", "output": "select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid order by t1.pname"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name and hours of the students whose tryout decision is yes.", "output": "select t1.pname, t1.hs from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names and hours spent practicing of every student who received a yes at tryouts?", "output": "select t1.pname, t1.hs from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as striker. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the states of the colleges that have students in the tryout who played in striker position.", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'striker'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as striker. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the states of the colleges where students who tried out for the striker position attend?", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'striker'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as striker.The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the names of the students who are in the position of striker and got a yes tryout decision.", "output": "select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' and t2.ppos = 'striker'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as striker. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of all students who successfully tried out for the position of striker?", "output": "select t1.pname from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes' and t2.ppos = 'striker'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The pname contains values such as Charles. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the state of the college which player Charles is attending.", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname join player as t3 on t2.pid = t3.pid where t3.pname = 'Charles'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The pname contains values such as Charles. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "In which state is the college that Charles attends?", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname join player as t3 on t2.pid = t3.pid where t3.pname = 'Charles'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as yes. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as yes. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the average and maximum hours for the students whose tryout decision is yes.", "output": "select avg(t1.hs), max(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the average and maximum number of hours students who made the team practiced?", "output": "select avg(t1.hs), max(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as no. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The decision contains values such as no. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the average hours for the students whose tryout decision is no.", "output": "select avg(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'no'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the average number of hours spent practicing for students who got rejected?", "output": "select avg(t1.hs) from player as t1 join tryout as t2 on t1.pid = t2.pid where t2.decision = 'no'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the maximum training hours for the students whose training hours is greater than 1000 in different positions?", "output": "select max(t1.hs), ppos from player as t1 join tryout as t2 on t1.pid = t2.pid where t1.hs > 1000 group by t2.ppos"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "For each position, what is the maximum number of hours for students who spent more than 1000 hours training?", "output": "select max(t1.hs), ppos from player as t1 join tryout as t2 on t1.pid = t2.pid where t1.hs > 1000 group by t2.ppos"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Which colleges do the tryout players whose name starts with letter D go to?", "output": "select t1.cname from tryout as t1 join player as t2 on t1.pid = t2.pid where t2.pname like 'D%'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Which colleges does each player with a name that starts with the letter D who tried out go to?", "output": "select t1.cname from tryout as t1 join player as t2 on t1.pid = t2.pid where t2.pname like 'D%'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Which college has any student who is a goalie and succeeded in the tryout.", "output": "select cname from tryout where decision = 'yes' and ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What college has a student who successfully made the team in the role of a goalie?", "output": "select cname from tryout where decision = 'yes' and ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the name of the tryout players who are from the college with largest size.", "output": "select t2.pname from tryout as t1 join player as t2 on t1.pid = t2.pid where t1.cname = (select cname from college order by enr desc limit 1)"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of all tryout participants who are from the largest college?", "output": "select t2.pname from tryout as t1 join player as t2 on t1.pid = t2.pid where t1.cname = (select cname from college order by enr desc limit 1)"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the state and enrollment of the colleges where have any students who got accepted in the tryout decision.", "output": "select distinct t1.state, t1.enr from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many students are enrolled in colleges that have student accepted during tryouts, and in which states are those colleges?", "output": "select distinct t1.state, t1.enr from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.decision = 'yes'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. The state contains values such as AZ, LA. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.", "output": "select cname from college where enr < 13000 and state = \"AZ\" union select cname from college where enr > 15000 and state = \"LA\""}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. The state contains values such as AZ, LA. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?", "output": "select cname from college where enr < 13000 and state = \"AZ\" union select cname from college where enr > 15000 and state = \"LA\""}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie, mid. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the names of schools that have some students playing in goalie and mid positions.", "output": "select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as mid. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of all schools that have students trying out for the position of goal and 'mid'-field.", "output": "select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie, mid. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the names of states that have some college students playing in goalie and mid positions.", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie' intersect select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of the states that have some college students playing in the positions of goalie and mid-field?", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie' intersect select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie, mid. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many schools have some students playing in goalie and mid positions.", "output": "select count(*) from (select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many schools have students playing in goalie and mid-field positions?", "output": "select count(*) from (select cname from tryout where ppos = 'goalie' intersect select cname from tryout where ppos = 'mid')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie, mid. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the names of schools that have some players in the mid position but not in the goalie position.", "output": "select cname from tryout where ppos = 'mid' except select cname from tryout where ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as no. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as mid, goalie.The decision contains values such as no. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of the schools with some players in the mid position but no goalies?", "output": "select cname from tryout where ppos = 'mid' except select cname from tryout where ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie, mid. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the names of states that have some college students playing in the mid position but not in the goalie position.", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. The ycard contains values such as no. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as mid, goalie.The decision contains values such as no. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of all the states with college students playing in the mid position but no goalies?", "output": "select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie'"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie, mid. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many states that have some college students playing in the mid position but not in the goalie position.", "output": "select count(*) from (select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as mid, goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the count of states with college students playing in the mid position but not as goalies?", "output": "select count(*) from (select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'mid' except select t1.state from college as t1 join tryout as t2 on t1.cname = t2.cname where t2.ppos = 'goalie')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find the states where have the colleges whose enrollments are less than the largest size.", "output": "select distinct state from college where enr < (select max(enr) from college)"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the states with colleges that have enrollments less than the some other college?", "output": "select distinct state from college where enr < (select max(enr) from college)"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. The state contains values such as FL. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.", "output": "select distinct cname from college where enr > (select min(enr) from college where state = 'FL')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of the colleges that are larger than at least one college in Florida?", "output": "select distinct cname from college where enr > (select min(enr) from college where state = 'FL')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. The state contains values such as FL. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.", "output": "select cname from college where enr > (select max(enr) from college where state = 'FL')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What are the names of all colleges with a larger enrollment than the largest college in Florida?", "output": "select cname from college where enr > (select max(enr) from college where state = 'FL')"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the total number of enrollment of schools that do not have any goalie player?", "output": "select sum(enr) from college where cname not in (select cname from tryout where ppos = \"goalie\")"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The ppos contains values such as goalie. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the total number of students enrolled in schools without any goalies?", "output": "select sum(enr) from college where cname not in (select cname from tryout where ppos = \"goalie\")"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the number of states that has some college whose enrollment is larger than the average enrollment?", "output": "select count(distinct state) from college where enr > (select avg(enr) from college)"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many states have a college with more students than average?", "output": "select count(distinct state) from college where enr > (select avg(enr) from college)"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "What is the number of states that has some colleges whose enrollment is smaller than the average enrollment?", "output": "select count(distinct state) from college where enr < (select avg(enr) from college)"}, {"instruction": "soccer_2 contains tables such as college, player, tryout. Table college has columns such as cname, state, enr. cname is the primary key. Table player has columns such as pid, pname, ycard, hs. pid is the primary key. Table tryout has columns such as pid, cname, ppos, decision. pid is the primary key. The cname of tryout is the foreign key of cname of college. The pid of tryout is the foreign key of pid of player.", "input": "How many states have smaller colleges than average?", "output": "select count(distinct state) from college where enr < (select avg(enr) from college)"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "How many devices are there?", "output": "select count(*) from device"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Count the number of devices.", "output": "select count(*) from device"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "List the carriers of devices in ascending alphabetical order.", "output": "select carrier from device order by carrier asc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the different carriers for devices, listed in alphabetical order?", "output": "select carrier from device order by carrier asc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. The software_platform contains values such as Android. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the carriers of devices whose software platforms are not \"Android\"?", "output": "select carrier from device where software_platform != 'Android'"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. The software_platform contains values such as Android. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Return the device carriers that do not have Android as their software platform.", "output": "select carrier from device where software_platform != 'Android'"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the names of shops in ascending order of open year?", "output": "select shop_name from shop order by open_year asc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Return the names of shops, ordered by year of opening ascending.", "output": "select shop_name from shop order by open_year asc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What is the average quantity of stocks?", "output": "select avg(quantity) from stock"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Give the average quantity of stocks.", "output": "select avg(quantity) from stock"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the names and location of the shops in ascending alphabetical order of name.", "output": "select shop_name, location from shop order by shop_name asc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Return the names and locations of shops, ordered by name in alphabetical order.", "output": "select shop_name, location from shop order by shop_name asc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "How many different software platforms are there for devices?", "output": "select count(distinct software_platform) from device"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Count the number of different software platforms.", "output": "select count(distinct software_platform) from device"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. The device contains values such as Apple. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. The shop_name contains values such as Apple. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "List the open date of open year of the shop named \"Apple\".", "output": "select open_date, open_year from shop where shop_name = \"Apple\""}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. The device contains values such as Apple. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. The shop_name contains values such as Apple. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the open dates and years for the shop named Apple?", "output": "select open_date, open_year from shop where shop_name = \"Apple\""}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "List the name of the shop with the latest open year.", "output": "select shop_name from shop order by open_year desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What is the shop name corresponding to the shop that opened in the most recent year?", "output": "select shop_name from shop order by open_year desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Show names of shops and the carriers of devices they have in stock.", "output": "select t3.shop_name, t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id join shop as t3 on t1.shop_id = t3.shop_id"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the names of device shops, and what are the carriers that they carry devices in stock for?", "output": "select t3.shop_name, t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id join shop as t3 on t1.shop_id = t3.shop_id"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Show names of shops that have more than one kind of device in stock.", "output": "select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id having count(*) > 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the names of shops that have more than a single kind of device in stock?", "output": "select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id having count(*) > 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Show the name of the shop that has the most kind of devices in stock.", "output": "select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by count(*) desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What is the name of the shop that has the most different kinds of devices in stock?", "output": "select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by count(*) desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Show the name of the shop that have the largest quantity of devices in stock.", "output": "select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by sum(t1.quantity) desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What is the name of the shop that has the greatest quantity of devices in stock?", "output": "select t2.shop_name from stock as t1 join shop as t2 on t1.shop_id = t2.shop_id group by t1.shop_id order by sum(t1.quantity) desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Please show different software platforms and the corresponding number of devices using each.", "output": "select software_platform, count(*) from device group by software_platform"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the different software platforms for devices, and how many devices have each?", "output": "select software_platform, count(*) from device group by software_platform"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Please show the software platforms of devices in descending order of the count.", "output": "select software_platform from device group by software_platform order by count(*) desc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the different software platforms for devices, ordered by frequency descending?", "output": "select software_platform from device group by software_platform order by count(*) desc"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "List the software platform shared by the greatest number of devices.", "output": "select software_platform from device group by software_platform order by count(*) desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What is the software platform that is most common amongst all devices?", "output": "select software_platform from device group by software_platform order by count(*) desc limit 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "List the names of shops that have no devices in stock.", "output": "select shop_name from shop where shop_id not in (select shop_id from stock)"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the names of shops that do not have any devices in stock?", "output": "select shop_name from shop where shop_id not in (select shop_id from stock)"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.", "output": "select location from shop where open_year > 2012 intersect select location from shop where open_year < 2008"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?", "output": "select location from shop where open_year > 2012 intersect select location from shop where open_year < 2008"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "List the carriers of devices that have no devices in stock.", "output": "select carrier from device where device_id not in (select device_id from stock)"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the carriers of devices that are not in stock anywhere?", "output": "select carrier from device where device_id not in (select device_id from stock)"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "Show the carriers of devices in stock at more than one shop.", "output": "select t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id group by t1.device_id having count(*) > 1"}, {"instruction": "device contains tables such as device, shop, stock. Table device has columns such as device_id, device, carrier, package_version, applications, software_platform. device_id is the primary key. Table shop has columns such as shop_id, shop_name, location, open_date, open_year. shop_id is the primary key. Table stock has columns such as shop_id, device_id, quantity. shop_id is the primary key. The device_id of stock is the foreign key of device_id of device. The shop_id of stock is the foreign key of shop_id of shop.", "input": "What are the carriers of devices that are in stock in more than a single shop?", "output": "select t2.carrier from stock as t1 join device as t2 on t1.device_id = t2.device_id group by t1.device_id having count(*) > 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "How many bookings do we have?", "output": "select count(*) from bookings"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Count the total number of bookings made.", "output": "select count(*) from bookings"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "List the order dates of all the bookings.", "output": "select order_date from bookings"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the order date of each booking?", "output": "select order_date from bookings"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show all the planned delivery dates and actual delivery dates of bookings.", "output": "select planned_delivery_date, actual_delivery_date from bookings"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the planned delivery date and actual delivery date for each booking?", "output": "select planned_delivery_date, actual_delivery_date from bookings"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "How many customers do we have?", "output": "select count(*) from customers"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Count the number of customers recorded.", "output": "select count(*) from customers"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. The customer_name contains values such as Harold. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the phone and email for customer Harold?", "output": "select customer_phone, customer_email_address from customers where customer_name = \"Harold\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. The customer_name contains values such as Harold. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the phone number and email address of customer \"Harold\".", "output": "select customer_phone, customer_email_address from customers where customer_name = \"Harold\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show all the Store_Name of drama workshop groups.", "output": "select store_name from drama_workshop_groups"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the store names of drama workshop groups?", "output": "select store_name from drama_workshop_groups"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show the minimum, average, maximum order quantity of all invoices.", "output": "select min(order_quantity), avg(order_quantity), max(order_quantity) from invoices"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the minimum, average, and maximum quantities ordered? Check all the invoices.", "output": "select min(order_quantity), avg(order_quantity), max(order_quantity) from invoices"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the distinct payment method codes in all the invoices?", "output": "select distinct payment_method_code from invoices"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show me the distinct payment method codes from the invoice record.", "output": "select distinct payment_method_code from invoices"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. The marketing_region_name contains values such as China. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the description of the marketing region China?", "output": "select marketing_region_descriptrion from marketing_regions where marketing_region_name = \"China\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. The marketing_region_name contains values such as China. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the marketing region description of China?", "output": "select marketing_region_descriptrion from marketing_regions where marketing_region_name = \"China\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show all the distinct product names with price higher than the average.", "output": "select distinct product_name from products where product_price > (select avg(product_price) from products)"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the distinct names of the products that cost more than the average?", "output": "select distinct product_name from products where product_price > (select avg(product_price) from products)"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the name of the most expensive product?", "output": "select product_name from products order by product_price desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Tell me the name of the most pricy product.", "output": "select product_name from products order by product_price desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "List all product names in ascending order of price.", "output": "select product_name from products order by product_price asc"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Sort the names of products in ascending order of their price.", "output": "select product_name from products order by product_price asc"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. The customer_name contains values such as Ashley. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the phone number of the performer Ashley?", "output": "select customer_phone from performers where customer_name = \"Ashley\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. The customer_name contains values such as Ashley. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the phone number of performer \"Ashley\".", "output": "select customer_phone from performers where customer_name = \"Ashley\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show all payment method codes and the number of orders for each code.", "output": "select payment_method_code, count(*) from invoices group by payment_method_code"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "List the distinct payment method codes with the number of orders made", "output": "select payment_method_code, count(*) from invoices group by payment_method_code"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the payment method code used by the most orders?", "output": "select payment_method_code from invoices group by payment_method_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the payment method that is used the most often in all the invoices. Give me its code.", "output": "select payment_method_code from invoices group by payment_method_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. The store_name contains values such as FJA Filming. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Which city is the address of the store named \"FJA Filming\" located in?", "output": "select t1.city_town from addresses as t1 join stores as t2 on t1.address_id = t2.address_id where t2.store_name = \"FJA Filming\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. The store_name contains values such as FJA Filming. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the city the store named \"FJA Filming\" is in.", "output": "select t1.city_town from addresses as t1 join stores as t2 on t1.address_id = t2.address_id where t2.store_name = \"FJA Filming\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. The marketing_region_code contains values such as CA. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. The marketing_region_code contains values such as CA. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the states or counties of the address of the stores with marketing region code \"CA\"?", "output": "select t1.state_county from addresses as t1 join stores as t2 on t1.address_id = t2.address_id where t2.marketing_region_code = \"CA\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. The marketing_region_code contains values such as CA. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. The marketing_region_code contains values such as CA. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the states or counties where the stores with marketing region code \"CA\" are located.", "output": "select t1.state_county from addresses as t1 join stores as t2 on t1.address_id = t2.address_id where t2.marketing_region_code = \"CA\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as dinning. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. The store_name contains values such as Rob Dinning. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as dinning. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the name of the marketing region that the store Rob Dinning belongs to?", "output": "select t1.marketing_region_name from marketing_regions as t1 join stores as t2 on t1.marketing_region_code = t2.marketing_region_code where t2.store_name = \"Rob Dinning\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as dinning. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. The store_name contains values such as Rob Dinning. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as dinning. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Return the name of the marketing region the store Rob Dinning is located in.", "output": "select t1.marketing_region_name from marketing_regions as t1 join stores as t2 on t1.marketing_region_code = t2.marketing_region_code where t2.store_name = \"Rob Dinning\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the descriptions of the service types with product price above 100?", "output": "select t1.service_type_description from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code where t2.product_price > 100"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Give me the descriptions of the service types that cost more than 100.", "output": "select t1.service_type_description from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code where t2.product_price > 100"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the description, code and the corresponding count of each service type?", "output": "select t1.service_type_description, t2.service_type_code, count(*) from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code group by t2.service_type_code"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "List the description, code and the number of services for each service type.", "output": "select t1.service_type_description, t2.service_type_code, count(*) from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code group by t2.service_type_code"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the description and code of the type of service that is performed the most often?", "output": "select t1.service_type_description, t1.service_type_code from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code group by t1.service_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the description and code of the service type that is performed the most times.", "output": "select t1.service_type_description, t1.service_type_code from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code group by t1.service_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the phones and emails of workshop groups in which services are performed?", "output": "select t1.store_phone, t1.store_email_address from drama_workshop_groups as t1 join services as t2 on t1.workshop_group_id = t2.workshop_group_id"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Give me all the phone numbers and email addresses of the workshop groups where services are performed.", "output": "select t1.store_phone, t1.store_email_address from drama_workshop_groups as t1 join services as t2 on t1.workshop_group_id = t2.workshop_group_id"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as film. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as film. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the names of workshop groups in which services with product name \"film\" are performed?", "output": "select t1.store_phone, t1.store_email_address from drama_workshop_groups as t1 join services as t2 on t1.workshop_group_id = t2.workshop_group_id where t2.product_name = \"film\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as film. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as film. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the names of the workshop groups where services with product name \"film\" are performed.", "output": "select t1.store_phone, t1.store_email_address from drama_workshop_groups as t1 join services as t2 on t1.workshop_group_id = t2.workshop_group_id where t2.product_name = \"film\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the different product names? What is the average product price for each of them?", "output": "select product_name, avg(product_price) from products group by product_name"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "For each distinct product name, show its average product price.", "output": "select product_name, avg(product_price) from products group by product_name"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the product names with average product price smaller than 1000000?", "output": "select product_name from products group by product_name having avg(product_price) < 1000000"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the product names whose average product price is below 1000000.", "output": "select product_name from products group by product_name having avg(product_price) < 1000000"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as photo. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as photo. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the total order quantities of photo products?", "output": "select sum(t1.order_quantity) from order_items as t1 join products as t2 on t1.product_id = t2.product_id where t2.product_name = \"photo\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as photo. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as photo. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Compute the total order quantities of the product \"photo\".", "output": "select sum(t1.order_quantity) from order_items as t1 join products as t2 on t1.product_id = t2.product_id where t2.product_name = \"photo\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the order details of the products with price higher than 2000?", "output": "select t1.other_item_details from order_items as t1 join products as t2 on t1.product_id = t2.product_id where t2.product_price > 2000"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the order detail for the products with price above 2000.", "output": "select t1.other_item_details from order_items as t1 join products as t2 on t1.product_id = t2.product_id where t2.product_price > 2000"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the actual delivery dates of orders with quantity 1?", "output": "select t1.actual_delivery_date from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t2.order_quantity = 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "List the actual delivery date for all the orders with quantity 1", "output": "select t1.actual_delivery_date from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t2.order_quantity = 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the order dates of orders with price higher than 1000?", "output": "select t1.order_date from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id join products as t3 on t2.product_id = t3.product_id where t3.product_price > 1000"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the order dates of the orders with price above 1000.", "output": "select t1.order_date from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id join products as t3 on t2.product_id = t3.product_id where t3.product_price > 1000"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "How many distinct currency codes are there for all drama workshop groups?", "output": "select count(distinct currency_code) from drama_workshop_groups"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the number of distinct currency codes used in drama workshop groups.", "output": "select count(distinct currency_code) from drama_workshop_groups"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. The city_town contains values such as Feliciaberg. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the names of the drama workshop groups with address in Feliciaberg city?", "output": "select t2.store_name from addresses as t1 join drama_workshop_groups as t2 on t1.address_id = t2.address_id where t1.city_town = \"Feliciaberg\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. The city_town contains values such as Feliciaberg. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Return the the names of the drama workshop groups that are located in Feliciaberg city.", "output": "select t2.store_name from addresses as t1 join drama_workshop_groups as t2 on t1.address_id = t2.address_id where t1.city_town = \"Feliciaberg\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. The state_county contains values such as Alaska. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the email addresses of the drama workshop groups with address in Alaska state?", "output": "select t2.store_email_address from addresses as t1 join drama_workshop_groups as t2 on t1.address_id = t2.address_id where t1.state_county = \"Alaska\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. The state_county contains values such as Alaska. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "List the email addresses of the drama workshop groups located in Alaska state.", "output": "select t2.store_email_address from addresses as t1 join drama_workshop_groups as t2 on t1.address_id = t2.address_id where t1.state_county = \"Alaska\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show all cities along with the number of drama workshop groups in each city.", "output": "select t1.city_town, count(*) from addresses as t1 join drama_workshop_groups as t2 on t1.address_id = t2.address_id group by t1.city_town"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "How many drama workshop groups are there in each city? Return both the city and the count.", "output": "select t1.city_town, count(*) from addresses as t1 join drama_workshop_groups as t2 on t1.address_id = t2.address_id group by t1.city_town"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the marketing region code that has the most drama workshop groups?", "output": "select marketing_region_code from drama_workshop_groups group by marketing_region_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Which marketing region has the most drama workshop groups? Give me the region code.", "output": "select marketing_region_code from drama_workshop_groups group by marketing_region_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show all cities where at least one customer lives in but no performer lives in.", "output": "select t1.city_town from addresses as t1 join customers as t2 on t1.address_id = t2.address_id except select t1.city_town from addresses as t1 join performers as t2 on t1.address_id = t2.address_id"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Which cities have at least one customer but no performer?", "output": "select t1.city_town from addresses as t1 join customers as t2 on t1.address_id = t2.address_id except select t1.city_town from addresses as t1 join performers as t2 on t1.address_id = t2.address_id"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the most frequent status of bookings?", "output": "select status_code from bookings group by status_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Which status code is the most common of all the bookings?", "output": "select status_code from bookings group by status_code order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. The status_code contains values such as stop. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the names of the workshop groups that have bookings with status code \"stop\"?", "output": "select t2.store_name from bookings as t1 join drama_workshop_groups as t2 on t1.workshop_group_id = t2.workshop_group_id where t1.status_code = \"stop\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. The status_code contains values such as stop. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Which workshop groups have bookings with status code \"stop\"? Give me the names.", "output": "select t2.store_name from bookings as t1 join drama_workshop_groups as t2 on t1.workshop_group_id = t2.workshop_group_id where t1.status_code = \"stop\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Show the names of all the clients with no booking.", "output": "select customer_name from clients except select t2.customer_name from bookings as t1 join clients as t2 on t1.customer_id = t2.client_id"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What are the names of the clients who do not have any booking?", "output": "select customer_name from clients except select t2.customer_name from bookings as t1 join clients as t2 on t1.customer_id = t2.client_id"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. The payment_method_code contains values such as MasterCard. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. The payment_method_code contains values such as MasterCard. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the average quantities ordered with payment method code \"MasterCard\" on invoices?", "output": "select avg(order_quantity) from invoices where payment_method_code = \"MasterCard\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. The payment_method_code contains values such as MasterCard. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. The payment_method_code contains values such as MasterCard. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Check the invoices record and compute the average quantities ordered with the payment method \"MasterCard\".", "output": "select avg(order_quantity) from invoices where payment_method_code = \"MasterCard\""}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the product ID of the most frequently ordered item on invoices?", "output": "select product_id from invoices group by product_id order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Find the id of the product ordered the most often on invoices.", "output": "select product_id from invoices group by product_id order by count(*) desc limit 1"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as film, photo. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as film, photo. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "What is the description of the service type which offers both the photo product and the film product?", "output": "select t1.service_type_description from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code where t2.product_name = 'photo' intersect select t1.service_type_description from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code where t2.product_name = 'film'"}, {"instruction": "cre_Drama_Workshop_Groups contains tables such as ref_payment_methods, ref_service_types, addresses, products, marketing_regions, clients, drama_workshop_groups, performers, customers, stores, bookings, performers_in_bookings, customer_orders, order_items, invoices, services, bookings_services, invoice_items. Table ref_payment_methods has columns such as payment_method_code, payment_method_description. payment_method_code is the primary key. Table ref_service_types has columns such as service_type_code, parent_service_type_code, service_type_description. service_type_code is the primary key. Table addresses has columns such as address_id, line_1, line_2, city_town, state_county, other_details. address_id is the primary key. Table products has columns such as product_id, product_name, product_price, product_description, other_product_service_details. product_id is the primary key. The product_name contains values such as film, photo. Table marketing_regions has columns such as marketing_region_code, marketing_region_name, marketing_region_descriptrion, other_details. marketing_region_code is the primary key. Table clients has columns such as client_id, address_id, customer_email_address, customer_name, customer_phone, other_details. client_id is the primary key. Table drama_workshop_groups has columns such as workshop_group_id, address_id, currency_code, marketing_region_code, store_name, store_phone, store_email_address, other_details. workshop_group_id is the primary key. Table performers has columns such as performer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. performer_id is the primary key. Table customers has columns such as customer_id, address_id, customer_name, customer_phone, customer_email_address, other_details. customer_id is the primary key. Table stores has columns such as store_id, address_id, marketing_region_code, store_name, store_phone, store_email_address, other_details. store_id is the primary key. Table bookings has columns such as booking_id, customer_id, workshop_group_id, status_code, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. booking_id is the primary key. Table performers_in_bookings has columns such as order_id, performer_id. order_id is the primary key. Table customer_orders has columns such as order_id, customer_id, store_id, order_date, planned_delivery_date, actual_delivery_date, other_order_details. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity, other_item_details. order_item_id is the primary key. Table invoices has columns such as invoice_id, order_id, payment_method_code, product_id, order_quantity, other_item_details, order_item_id. invoice_id is the primary key. Table services has columns such as service_id, service_type_code, workshop_group_id, product_description, product_name, product_price, other_product_service_details. service_id is the primary key. The product_name contains values such as film, photo. Table bookings_services has columns such as order_id, product_id. order_id is the primary key. Table invoice_items has columns such as invoice_item_id, invoice_id, order_id, order_item_id, product_id, order_quantity, other_item_details. invoice_item_id is the primary key. The address_id of clients is the foreign key of address_id of addresses. The address_id of drama_workshop_groups is the foreign key of address_id of addresses. The address_id of performers is the foreign key of address_id of addresses. The address_id of customers is the foreign key of address_id of addresses. The marketing_region_code of stores is the foreign key of marketing_region_code of marketing_regions. The address_id of stores is the foreign key of address_id of addresses. The workshop_group_id of bookings is the foreign key of workshop_group_id of drama_workshop_groups. The customer_id of bookings is the foreign key of client_id of clients. The order_id of performers_in_bookings is the foreign key of booking_id of bookings. The performer_id of performers_in_bookings is the foreign key of performer_id of performers. The store_id of customer_orders is the foreign key of store_id of stores. The customer_id of customer_orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of customer_orders. The payment_method_code of invoices is the foreign key of payment_method_code of ref_payment_methods. The order_id of invoices is the foreign key of booking_id of bookings. The order_id of invoices is the foreign key of order_id of customer_orders. The service_type_code of services is the foreign key of service_type_code of ref_service_types. The workshop_group_id of services is the foreign key of workshop_group_id of drama_workshop_groups. The product_id of bookings_services is the foreign key of service_id of services. The order_id of bookings_services is the foreign key of booking_id of bookings. The order_id of invoice_items is the foreign key of order_id of bookings_services. The product_id of invoice_items is the foreign key of product_id of bookings_services. The invoice_id of invoice_items is the foreign key of invoice_id of invoices. The order_item_id of invoice_items is the foreign key of order_item_id of order_items.", "input": "Give me the description of the service type that offers not only the photo product but also the film product.", "output": "select t1.service_type_description from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code where t2.product_name = 'photo' intersect select t1.service_type_description from ref_service_types as t1 join services as t2 on t1.service_type_code = t2.service_type_code where t2.product_name = 'film'"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many bands are there?", "output": "select count(*) from band"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find the number of bands.", "output": "select count(*) from band"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are all the labels?", "output": "select distinct label from albums"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the different album labels listed?", "output": "select distinct label from albums"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the albums in 2012.", "output": "select * from albums where year = 2012"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "return all columns of the albums created in the year of 2012.", "output": "select * from albums where year = 2012"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the stage positions of the musicians with first name \"Solveig\"", "output": "select distinct t1.stageposition from performance as t1 join band as t2 on t1.bandmate = t2.id where firstname = \"Solveig\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the different stage positions for all musicians whose first name is \"Solveig\"?", "output": "select distinct t1.stageposition from performance as t1 join band as t2 on t1.bandmate = t2.id where firstname = \"Solveig\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many songs are there?", "output": "select count(*) from songs"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Count the number of songs.", "output": "select count(*) from songs"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the songs performed by artist with last name \"Heilo\"", "output": "select t3.title from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t2.lastname = \"Heilo\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the names of the songs by the artist whose last name is \"Heilo\"?", "output": "select t3.title from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t2.lastname = \"Heilo\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Hom many musicians performed in the song \"Flash\"?", "output": "select count(*) from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Flash\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many musicians play in the song \"Flash\"?", "output": "select count(*) from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Flash\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the songs produced by artists with first name \"Marianne\".", "output": "select t3.title from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t2.firstname = \"Marianne\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the names of all songs produced by the artist with the first name \"Marianne\"?", "output": "select t3.title from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t2.firstname = \"Marianne\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Who performed the song named \"Badlands\"? Show the first name and the last name.", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the first and last names of the artist who perfomed the song \"Badlands\"?", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Who is performing in the back stage position for the song \"Badlands\"? Show the first name and the last name.", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Badlands\" and t1.stageposition = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the first and last names of the performer who was in the back stage position for the song \"Badlands\"?", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Badlands\" and t1.stageposition = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many unique labels are there for albums?", "output": "select count(distinct label) from albums"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the unique labels for the albums?", "output": "select count(distinct label) from albums"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the label that has the most albums?", "output": "select label from albums group by label order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the label with the most albums?", "output": "select label from albums group by label order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the last name of the musician that have produced the most number of songs?", "output": "select t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid group by lastname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the last name of the musician who was in the most songs?", "output": "select t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid group by lastname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the last name of the musician that has been at the back position the most?", "output": "select t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id where stageposition = \"back\" group by lastname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the last name of the musicians who has played back position the most?", "output": "select t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id where stageposition = \"back\" group by lastname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the songs whose name contains the word \"the\".", "output": "select title from songs where title like '% the %'"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the names of the songs whose title has the word \"the\"?", "output": "select title from songs where title like '% the %'"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are all the instruments used?", "output": "select distinct instrument from instruments"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the different instruments listed in the database?", "output": "select distinct instrument from instruments"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What instrument did the musician with last name \"Heilo\" use in the song \"Le Pop\"?", "output": "select t4.instrument from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid join instruments as t4 on t4.songid = t3.songid and t4.bandmateid = t2.id where t2.lastname = \"Heilo\" and t3.title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What instruments did the musician with the last name \"Heilo\" play in the song \"Le Pop\"?", "output": "select t4.instrument from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid join instruments as t4 on t4.songid = t3.songid and t4.bandmateid = t2.id where t2.lastname = \"Heilo\" and t3.title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the most used instrument?", "output": "select instrument from instruments group by instrument order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What instrument is used the most?", "output": "select instrument from instruments group by instrument order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many songs have used the instrument \"drums\"?", "output": "select count(*) from instruments where instrument = \"drums\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many songs use drums as an instrument?", "output": "select count(*) from instruments where instrument = \"drums\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What instruments does the the song \"Le Pop\" use?", "output": "select instrument from instruments as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the instruments are used in the song \"Le Pop\"?", "output": "select instrument from instruments as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many instruments does the song \"Le Pop\" use?", "output": "select count(distinct instrument) from instruments as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many different instruments are used in the song \"Le Pop\"?", "output": "select count(distinct instrument) from instruments as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many instrument does the musician with last name \"Heilo\" use?", "output": "select count(distinct instrument) from instruments as t1 join band as t2 on t1.bandmateid = t2.id where t2.lastname = \"Heilo\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many different instruments does the musician with the last name \"Heilo\" use?", "output": "select count(distinct instrument) from instruments as t1 join band as t2 on t1.bandmateid = t2.id where t2.lastname = \"Heilo\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the instruments ever used by the musician with last name \"Heilo\"?", "output": "select instrument from instruments as t1 join band as t2 on t1.bandmateid = t2.id where t2.lastname = \"Heilo\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are all the instruments used by the musician with the last name \"Heilo\"?", "output": "select instrument from instruments as t1 join band as t2 on t1.bandmateid = t2.id where t2.lastname = \"Heilo\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Which song has the most vocals?", "output": "select title from vocals as t1 join songs as t2 on t1.songid = t2.songid group by t1.songid order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the song with the most vocals?", "output": "select title from vocals as t1 join songs as t2 on t1.songid = t2.songid group by t1.songid order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Which vocal type is the most frequently appearring type?", "output": "select type from vocals group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the type of vocables that appears most frequently?", "output": "select type from vocals group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Which vocal type has the band mate with last name \"Heilo\" played the most?", "output": "select type from vocals as t1 join band as t2 on t1.bandmate = t2.id where lastname = \"Heilo\" group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the type of vocals that the band member with the last name \"Heilo\" played the most?", "output": "select type from vocals as t1 join band as t2 on t1.bandmate = t2.id where lastname = \"Heilo\" group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the vocal types used in song \"Le Pop\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the types of vocals used in the song \"Le Pop\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find the number of vocal types used in song \"Demon Kitty Rag\"?", "output": "select count(*) from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Demon kitty Rag\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the types of vocals used in the song \"Demon Kitty Rag\"?", "output": "select count(*) from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Demon kitty Rag\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many songs have a lead vocal?", "output": "select count(distinct title) from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"lead\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many songs have vocals of type lead?", "output": "select count(distinct title) from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"lead\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Which vocal type did the musician with first name \"Solveig\" played in the song with title \"A Bar in Amsterdam\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid join band as t3 on t1.bandmate = t3.id where t3.firstname = \"Solveig\" and t2.title = \"A bar in Amsterdam\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the types of vocals that the musician with the first name \"Solveig\" played in the song \"A Bar in Amsterdam\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid join band as t3 on t1.bandmate = t3.id where t3.firstname = \"Solveig\" and t2.title = \"A bar in Amsterdam\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the songs that do not have a lead vocal.", "output": "select distinct title from vocals as t1 join songs as t2 on t1.songid = t2.songid except select t2.title from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"lead\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the names of the songs without a lead vocal?", "output": "select distinct title from vocals as t1 join songs as t2 on t1.songid = t2.songid except select t2.title from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"lead\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the vocal types.", "output": "select distinct type from vocals"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the different types of vocals?", "output": "select distinct type from vocals"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the albums produced in year 2010?", "output": "select * from albums where year = 2010"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What information is there on albums from 2010?", "output": "select * from albums where year = 2010"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Who performed the song named \"Le Pop\"?", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the first and last name of artist who performed \"Le Pop\"?", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the last name of the musician that have produced the most songs?", "output": "select t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid group by lastname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the last name of the artist who sang the most songs?", "output": "select t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid group by lastname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What instrument did the musician with last name \"Heilo\" use in the song \"Badlands\"?", "output": "select t4.instrument from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid join instruments as t4 on t4.songid = t3.songid and t4.bandmateid = t2.id where t2.lastname = \"Heilo\" and t3.title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What instruments did the musician with the last name \"Heilo\" play in \"Badlands\"?", "output": "select t4.instrument from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid join instruments as t4 on t4.songid = t3.songid and t4.bandmateid = t2.id where t2.lastname = \"Heilo\" and t3.title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many instruments does the song \"Badlands\" use?", "output": "select count(distinct instrument) from instruments as t1 join songs as t2 on t1.songid = t2.songid where title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many different instruments are used in the song \"Badlands\"?", "output": "select count(distinct instrument) from instruments as t1 join songs as t2 on t1.songid = t2.songid where title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the vocal types used in song \"Badlands\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What types of vocals are used in the song \"Badlands\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Badlands\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find the number of vocal types used in song \"Le Pop\"", "output": "select count(*) from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many vocal types are used in the song \"Le Pop\"?", "output": "select count(*) from vocals as t1 join songs as t2 on t1.songid = t2.songid where title = \"Le Pop\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many songs have a shared vocal?", "output": "select count(distinct title) from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"shared\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many different songs have shared vocals?", "output": "select count(distinct title) from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"shared\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find all the songs that do not have a back vocal.", "output": "select distinct title from vocals as t1 join songs as t2 on t1.songid = t2.songid except select t2.title from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the different names of all songs without back vocals?", "output": "select distinct title from vocals as t1 join songs as t2 on t1.songid = t2.songid except select t2.title from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Which vocal type has the band mate with first name \"Solveig\" played the most?", "output": "select type from vocals as t1 join band as t2 on t1.bandmate = t2.id where firstname = \"Solveig\" group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the types of vocals that the band member with the first name \"Solveig\" played the most?", "output": "select type from vocals as t1 join band as t2 on t1.bandmate = t2.id where firstname = \"Solveig\" group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Which vocal type did the musician with last name \"Heilo\" played in the song with title \"Der Kapitan\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid join band as t3 on t1.bandmate = t3.id where t3.lastname = \"Heilo\" and t2.title = \"Der Kapitan\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the types of vocals that the musician with the last name \"Heilo\" played in \"Der Kapitan\"?", "output": "select type from vocals as t1 join songs as t2 on t1.songid = t2.songid join band as t3 on t1.bandmate = t3.id where t3.lastname = \"Heilo\" and t2.title = \"Der Kapitan\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find the first name of the band mate that has performed in most songs.", "output": "select t2.firstname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid group by firstname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the first name of the band mate who perfomed in the most songs?", "output": "select t2.firstname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid group by firstname order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Which vocal type has the band mate with first name \"Marianne\" played the most?", "output": "select type from vocals as t1 join band as t2 on t1.bandmate = t2.id where firstname = \"Marianne\" group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the vocal type of the band mate whose first name is \"Marianne\" played the most?", "output": "select type from vocals as t1 join band as t2 on t1.bandmate = t2.id where firstname = \"Marianne\" group by type order by count(*) desc limit 1"}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Who is performing in the back stage position for the song \"Der Kapitan\"? Show the first name and last name.", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Der Kapitan\" and t1.stageposition = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What is the first and last name of the artist who performed back stage for the song \"Der Kapitan\"?", "output": "select t2.firstname, t2.lastname from performance as t1 join band as t2 on t1.bandmate = t2.id join songs as t3 on t3.songid = t1.songid where t3.title = \"Der Kapitan\" and t1.stageposition = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find the name of songs that does not have a back vocal.", "output": "select distinct title from vocals as t1 join songs as t2 on t1.songid = t2.songid except select t2.title from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the names of the songs that do not have back vocals?", "output": "select distinct title from vocals as t1 join songs as t2 on t1.songid = t2.songid except select t2.title from vocals as t1 join songs as t2 on t1.songid = t2.songid where type = \"back\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the songs in album \"A Kiss Before You Go: Live in Hamburg\"?", "output": "select t3.title from albums as t1 join tracklists as t2 on t1.aid = t2.albumid join songs as t3 on t2.songid = t3.songid where t1.title = \"A kiss before you go: live in Hamburg\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the song titles on the album \"A Kiss Before You Go: Live in Hamburg\"?", "output": "select t3.title from albums as t1 join tracklists as t2 on t1.aid = t2.albumid join songs as t3 on t2.songid = t3.songid where t1.title = \"A kiss before you go: live in Hamburg\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are all the songs in albums under label \"Universal Music Group\"?", "output": "select t3.title from albums as t1 join tracklists as t2 on t1.aid = t2.albumid join songs as t3 on t2.songid = t3.songid where t1.label = \"Universal music Group\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "What are the names of all the songs whose album is under the label of \"Universal Music Group\"?", "output": "select t3.title from albums as t1 join tracklists as t2 on t1.aid = t2.albumid join songs as t3 on t2.songid = t3.songid where t1.label = \"Universal music Group\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "Find the number of songs in all the studio albums.", "output": "select count(distinct t3.title) from albums as t1 join tracklists as t2 on t1.aid = t2.albumid join songs as t3 on t2.songid = t3.songid where t1.type = \"Studio\""}, {"instruction": "music_2 contains tables such as songs, albums, band, instruments, performance, tracklists, vocals. Table songs has columns such as songid, title. songid is the primary key. Table albums has columns such as aid, title, year, label, type. aid is the primary key. Table band has columns such as id, firstname, lastname. id is the primary key. Table instruments has columns such as songid, bandmateid, instrument. songid is the primary key. Table performance has columns such as songid, bandmate, stageposition. songid is the primary key. Table tracklists has columns such as albumid, position, songid. albumid is the primary key. Table vocals has columns such as songid, bandmate, type. songid is the primary key. The bandmateid of instruments is the foreign key of id of band. The songid of instruments is the foreign key of songid of songs. The bandmate of performance is the foreign key of id of band. The songid of performance is the foreign key of songid of songs. The albumid of tracklists is the foreign key of aid of albums. The songid of tracklists is the foreign key of songid of songs. The bandmate of vocals is the foreign key of id of band. The songid of vocals is the foreign key of songid of songs.", "input": "How many songs appear in studio albums?", "output": "select count(distinct t3.title) from albums as t1 join tracklists as t2 on t1.aid = t2.albumid join songs as t3 on t2.songid = t3.songid where t1.type = \"Studio\""}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The name contains values such as Sony. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Who is the founder of Sony?", "output": "select founder from manufacturers where name = 'Sony'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The name contains values such as Sony. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Return the founder of Sony.", "output": "select founder from manufacturers where name = 'Sony'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The founder contains values such as James. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Where is the headquarter of the company founded by James?", "output": "select headquarter from manufacturers where founder = 'James'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The founder contains values such as James. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the headquarter of the company whose founder is James?", "output": "select headquarter from manufacturers where founder = 'James'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.", "output": "select name, headquarter from manufacturers order by revenue desc"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names and headquarters of all manufacturers, ordered by revenue descending?", "output": "select name, headquarter from manufacturers order by revenue desc"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the average, maximum and total revenues of all companies?", "output": "select avg(revenue), max(revenue), sum(revenue) from manufacturers"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Return the average, maximum, and total revenues across all manufacturers.", "output": "select avg(revenue), max(revenue), sum(revenue) from manufacturers"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The founder contains values such as Andy. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "How many companies were created by Andy?", "output": "select count(*) from manufacturers where founder = 'Andy'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The founder contains values such as Andy. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Return the number of companies created by Andy.", "output": "select count(*) from manufacturers where founder = 'Andy'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Austin. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the total revenue created by the companies whose headquarter is located at Austin.", "output": "select sum(revenue) from manufacturers where headquarter = 'Austin'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Austin. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the sum of revenue from companies with headquarters in Austin?", "output": "select sum(revenue) from manufacturers where headquarter = 'Austin'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the different cities listed?", "output": "select distinct headquarter from manufacturers"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Give the distinct headquarters of manufacturers.", "output": "select distinct headquarter from manufacturers"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Beijing, Tokyo. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the number of manufactures that are based in Tokyo or Beijing.", "output": "select count(*) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Beijing'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Beijing, Tokyo. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "How many manufacturers have headquarters in either Tokyo or Beijing?", "output": "select count(*) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Beijing'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the founder of the company whose name begins with the letter 'S'.", "output": "select founder from manufacturers where name like 'S%'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Who is the founders of companies whose first letter is S?", "output": "select founder from manufacturers where name like 'S%'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name of companies whose revenue is between 100 and 150.", "output": "select name from manufacturers where revenue between 100 and 150"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names of companies with revenue between 100 and 150?", "output": "select name from manufacturers where revenue between 100 and 150"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Taiwan, Tokyo. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the total revenue of all companies whose main office is at Tokyo or Taiwan?", "output": "select sum(revenue) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Taiwan'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Taiwan, Tokyo. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Return the total revenue of companies with headquarters in Tokyo or Taiwan.", "output": "select sum(revenue) from manufacturers where headquarter = 'Tokyo' or headquarter = 'Taiwan'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The name contains values such as Creative Labs, Sony. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name of product that is produced by both companies Creative Labs and Sony.", "output": "select t1.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t2.name = 'Creative Labs' intersect select t1.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t2.name = 'Sony'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The name contains values such as Creative Labs, Sony. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names of products produced by both Creative Labs and Sony?", "output": "select t1.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t2.name = 'Creative Labs' intersect select t1.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t2.name = 'Sony'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name, headquarter and founder of the manufacturer that has the highest revenue.", "output": "select name, headquarter, founder from manufacturers order by revenue desc limit 1"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names, headquarters and founders of the company with the highest revenue?", "output": "select name, headquarter, founder from manufacturers order by revenue desc limit 1"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name, headquarter and revenue of all manufacturers sorted by their revenue in the descending order.", "output": "select name, headquarter, revenue from manufacturers order by revenue desc"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names, headquarters and revenues for manufacturers, sorted by revenue descending?", "output": "select name, headquarter, revenue from manufacturers order by revenue desc"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name of companies whose revenue is greater than the average revenue of all companies.", "output": "select name from manufacturers where revenue > (select avg(revenue) from manufacturers)"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names of manufacturers with revenue greater than the average of all revenues?", "output": "select name from manufacturers where revenue > (select avg(revenue) from manufacturers)"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Austin. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name of companies whose revenue is smaller than the revenue of all companies based in Austin.", "output": "select name from manufacturers where revenue < (select min(revenue) from manufacturers where headquarter = 'Austin')"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Austin. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names of companies with revenue less than the lowest revenue of any manufacturer in Austin?", "output": "select name from manufacturers where revenue < (select min(revenue) from manufacturers where headquarter = 'Austin')"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Austin. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the total revenue of companies whose revenue is larger than the revenue of some companies based in Austin.", "output": "select sum(revenue) from manufacturers where revenue > (select min(revenue) from manufacturers where headquarter = 'Austin')"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The headquarter contains values such as Austin. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the total revenue of companies with revenue greater than the lowest revenue of any manufacturer in Austin?", "output": "select sum(revenue) from manufacturers where revenue > (select min(revenue) from manufacturers where headquarter = 'Austin')"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the total revenue of companies of each founder.", "output": "select sum(revenue), founder from manufacturers group by founder"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the total revenue of companies started by founder?", "output": "select sum(revenue), founder from manufacturers group by founder"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name and revenue of the company that earns the highest revenue in each city.", "output": "select name, max(revenue), headquarter from manufacturers group by headquarter"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names and revenues of the companies with the highest revenues in each headquarter city?", "output": "select name, max(revenue), headquarter from manufacturers group by headquarter"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the total revenue for each manufacturer.", "output": "select sum(revenue), name from manufacturers group by name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the total revenue of each manufacturer?", "output": "select sum(revenue), name from manufacturers group by name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the average prices of all products from each manufacture, and list each company's name.", "output": "select avg(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the average prices of products for each manufacturer?", "output": "select avg(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the number of different products that are produced by companies at different headquarter cities.", "output": "select count(distinct t1.name), t2.headquarter from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.headquarter"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "How many different products are produced in each headquarter city?", "output": "select count(distinct t1.name), t2.headquarter from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.headquarter"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The name contains values such as Sony. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find number of products which Sony does not make.", "output": "select count(distinct name) from products where name not in (select t1.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t2.name = 'Sony')"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. The name contains values such as Sony. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "How many products are not made by Sony?", "output": "select count(distinct name) from products where name not in (select t1.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t2.name = 'Sony')"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The name contains values such as DVD drive. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the name of companies that do not make DVD drive.", "output": "select name from manufacturers except select t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t1.name = 'DVD drive'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The name contains values such as DVD drive. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names of companies that do not make DVD drives?", "output": "select name from manufacturers except select t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code where t1.name = 'DVD drive'"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find the number of products for each manufacturer, showing the name of each company.", "output": "select count(*), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "How many products are there for each manufacturer?", "output": "select count(*), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the names of all the products in the store.", "output": "select name from products"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names of all products?", "output": "select name from products"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the names and the prices of all the products in the store.", "output": "select name, price from products"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names and prices of all products in the store?", "output": "select name, price from products"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the name of the products with a price less than or equal to $200.", "output": "select name from products where price <= 200"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names of products with price at most 200?", "output": "select name from products where price <= 200"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Find all information of all the products with a price between $60 and $120.", "output": "select * from products where price between 60 and 120"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is all the information of all the products that have a price between 60 and 120?", "output": "select * from products where price between 60 and 120"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Compute the average price of all the products.", "output": "select avg(price) from products"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the average price across all products?", "output": "select avg(price) from products"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Compute the average price of all products with manufacturer code equal to 2.", "output": "select avg(price) from products where manufacturer = 2"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the average price of products with manufacturer codes equal to 2?", "output": "select avg(price) from products where manufacturer = 2"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Compute the number of products with a price larger than or equal to $180.", "output": "select count(*) from products where price >= 180"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "How many products have prices of at least 180?", "output": "select count(*) from products where price >= 180"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the name and price of all products with a price larger than or equal to $180, and sort first by price (in descending order), and then by name (in ascending order).", "output": "select name, price from products where price >= 180 order by price desc, name asc"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?", "output": "select name, price from products where price >= 180 order by price desc, name asc"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select all the data from the products and each product's manufacturer.", "output": "select * from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is all the product data, as well as each product's manufacturer?", "output": "select * from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the average price of each manufacturer's products, showing only the manufacturer's code.", "output": "select avg(price), manufacturer from products group by manufacturer"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the average prices of products, grouped by manufacturer code?", "output": "select avg(price), manufacturer from products group by manufacturer"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the average price of each manufacturer's products, showing the manufacturer's name.", "output": "select avg(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the average prices of products, grouped by manufacturer name?", "output": "select avg(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the names of manufacturer whose products have an average price higher than or equal to $150.", "output": "select avg(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name having avg(t1.price) >= 150"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the names and average prices of products for manufacturers whose products cost on average 150 or more?", "output": "select avg(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name having avg(t1.price) >= 150"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the name and price of the cheapest product.", "output": "select name, price from products order by price asc limit 1"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What is the name and price of the cheapest product?", "output": "select name, price from products order by price asc limit 1"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the name of each manufacturer along with the name and price of its most expensive product.", "output": "select t1.name, max(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "For each manufacturer name, what are the names and prices of their most expensive product?", "output": "select t1.name, max(t1.price), t2.name from products as t1 join manufacturers as t2 on t1.manufacturer = t2.code group by t2.name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "Select the code of the product that is cheapest in each product category.", "output": "select code, name, min(price) from products group by name"}, {"instruction": "manufactory_1 contains tables such as manufacturers, products. Table manufacturers has columns such as code, name, headquarter, founder, revenue. code is the primary key. Table products has columns such as code, name, price, manufacturer. code is the primary key. The manufacturer of products is the foreign key of code of manufacturers.", "input": "What are the codes and names of the cheapest products in each category?", "output": "select code, name, min(price) from products group by name"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What is the id of the problem log that is created most recently?", "output": "select problem_log_id from problem_log order by log_entry_date desc limit 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which problem log was created most recently? Give me the log id.", "output": "select problem_log_id from problem_log order by log_entry_date desc limit 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What is the oldest log id and its corresponding problem id?", "output": "select problem_log_id, problem_id from problem_log order by log_entry_date limit 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find the oldest log id and its corresponding problem id.", "output": "select problem_log_id, problem_id from problem_log order by log_entry_date limit 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find all the ids and dates of the logs for the problem whose id is 10.", "output": "select problem_log_id, log_entry_date from problem_log where problem_id = 10"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "For the problem with id 10, return the ids and dates of its problem logs.", "output": "select problem_log_id, log_entry_date from problem_log where problem_id = 10"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "List all the log ids and their descriptions from the problem logs.", "output": "select problem_log_id, log_entry_description from problem_log"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the log id and entry description of each problem?", "output": "select problem_log_id, log_entry_description from problem_log"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.", "output": "select distinct staff_first_name, staff_last_name from staff as t1 join problem_log as t2 on t1.staff_id = t2.assigned_to_staff_id where t2.problem_id = 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which staff members are assigned to the problem with id 1? Give me their first and last names.", "output": "select distinct staff_first_name, staff_last_name from staff as t1 join problem_log as t2 on t1.staff_id = t2.assigned_to_staff_id where t2.problem_id = 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Rylan.The staff_last_name contains values such as Homenick. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "List the problem id and log id which are assigned to the staff named Rylan Homenick.", "output": "select distinct t2.problem_id, t2.problem_log_id from staff as t1 join problem_log as t2 on t1.staff_id = t2.assigned_to_staff_id where t1.staff_first_name = \"Rylan\" and t1.staff_last_name = \"Homenick\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Rylan.The staff_last_name contains values such as Homenick. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which problem id and log id are assigned to the staff named Rylan Homenick?", "output": "select distinct t2.problem_id, t2.problem_log_id from staff as t1 join problem_log as t2 on t1.staff_id = t2.assigned_to_staff_id where t1.staff_first_name = \"Rylan\" and t1.staff_last_name = \"Homenick\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "How many problems are there for product voluptatem?", "output": "select count(*) from product as t1 join problems as t2 on t1.product_id = t2.product_id where t1.product_name = \"voluptatem\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "How many problems did the product called \"voluptatem\" have in record?", "output": "select count(*) from product as t1 join problems as t2 on t1.product_id = t2.product_id where t1.product_name = \"voluptatem\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "How many problems does the product with the most problems have? List the number of the problems and product name.", "output": "select count(*), t1.product_name from product as t1 join problems as t2 on t1.product_id = t2.product_id group by t1.product_name order by count(*) desc limit 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which product has the most problems? Give me the number of problems and the product name.", "output": "select count(*), t1.product_name from product as t1 join problems as t2 on t1.product_id = t2.product_id group by t1.product_name order by count(*) desc limit 1"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Christop. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.", "output": "select t1.problem_description from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Christop\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Christop. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which problems are reported by the staff with first name \"Christop\"? Show the descriptions of the problems.", "output": "select t1.problem_description from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Christop\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_last_name contains values such as Bosco. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find the ids of the problems that are reported by the staff whose last name is Bosco.", "output": "select t1.problem_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_last_name = \"Bosco\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_last_name contains values such as Bosco. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which problems are reported by the staff with last name \"Bosco\"? Show the ids of the problems.", "output": "select t1.problem_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_last_name = \"Bosco\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the ids of the problems which are reported after 1978-06-26?", "output": "select problem_id from problems where date_problem_reported > \"1978-06-26\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find the ids of the problems reported after 1978-06-26.", "output": "select problem_id from problems where date_problem_reported > \"1978-06-26\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the ids of the problems which are reported before 1978-06-26?", "output": "select problem_id from problems where date_problem_reported < \"1978-06-26\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which problems are reported before 1978-06-26? Give me the ids of the problems.", "output": "select problem_id from problems where date_problem_reported < \"1978-06-26\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "For each product which has problems, what are the number of problems and the product id?", "output": "select count(*), t2.product_id from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_id"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "For each product with some problems, list the count of problems and the product id.", "output": "select count(*), t2.product_id from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_id"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "For each product that has problems, find the number of problems reported after 1986-11-13 and the product id?", "output": "select count(*), t2.product_id from problems as t1 join product as t2 on t1.product_id = t2.product_id where t1.date_problem_reported > \"1986-11-13\" group by t2.product_id"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the products that have problems reported after 1986-11-13? Give me the product id and the count of problems reported after 1986-11-13.", "output": "select count(*), t2.product_id from problems as t1 join product as t2 on t1.product_id = t2.product_id where t1.date_problem_reported > \"1986-11-13\" group by t2.product_id"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "List the names of all the distinct product names in alphabetical order?", "output": "select distinct product_name from product order by product_name"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Sort all the distinct product names in alphabetical order.", "output": "select distinct product_name from product order by product_name"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "List all the distinct product names ordered by product id?", "output": "select distinct product_name from product order by product_id"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What is the list of distinct product names sorted by product id?", "output": "select distinct product_name from product order by product_id"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Dameon, Jolie.The staff_last_name contains values such as Weber, Frami. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?", "output": "select product_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Dameon\" and t2.staff_last_name = \"Frami\" union select product_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Jolie\" and t2.staff_last_name = \"Weber\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Dameon, Jolie.The staff_last_name contains values such as Weber, Frami. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.", "output": "select product_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Dameon\" and t2.staff_last_name = \"Frami\" union select product_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Jolie\" and t2.staff_last_name = \"Weber\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Christop, Ashley.The staff_last_name contains values such as Medhurst, Berge. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?", "output": "select product_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Christop\" and t2.staff_last_name = \"Berge\" intersect select product_id from problems as t1 join staff as t2 on t1.closure_authorised_by_staff_id = t2.staff_id where t2.staff_first_name = \"Ashley\" and t2.staff_last_name = \"Medhurst\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Christop, Ashley.The staff_last_name contains values such as Medhurst, Berge. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.", "output": "select product_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where t2.staff_first_name = \"Christop\" and t2.staff_last_name = \"Berge\" intersect select product_id from problems as t1 join staff as t2 on t1.closure_authorised_by_staff_id = t2.staff_id where t2.staff_first_name = \"Ashley\" and t2.staff_last_name = \"Medhurst\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Lysanne.The staff_last_name contains values such as Turcotte. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?", "output": "select t1.problem_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where date_problem_reported < ( select min(date_problem_reported) from problems as t3 join staff as t4 on t3.reported_by_staff_id = t4.staff_id where t4.staff_first_name = \"Lysanne\" and t4.staff_last_name = \"Turcotte\" )"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Lysanne.The staff_last_name contains values such as Turcotte. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.", "output": "select t1.problem_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where date_problem_reported < ( select min(date_problem_reported) from problems as t3 join staff as t4 on t3.reported_by_staff_id = t4.staff_id where t4.staff_first_name = \"Lysanne\" and t4.staff_last_name = \"Turcotte\" )"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Rylan.The staff_last_name contains values such as Homenick. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?", "output": "select t1.problem_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where date_problem_reported > ( select max(date_problem_reported) from problems as t3 join staff as t4 on t3.reported_by_staff_id = t4.staff_id where t4.staff_first_name = \"Rylan\" and t4.staff_last_name = \"Homenick\" )"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Rylan.The staff_last_name contains values such as Homenick. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.", "output": "select t1.problem_id from problems as t1 join staff as t2 on t1.reported_by_staff_id = t2.staff_id where date_problem_reported > ( select max(date_problem_reported) from problems as t3 join staff as t4 on t3.reported_by_staff_id = t4.staff_id where t4.staff_first_name = \"Rylan\" and t4.staff_last_name = \"Homenick\" )"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find the top 3 products which have the largest number of problems?", "output": "select t2.product_name from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_name order by count(*) desc limit 3"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the three products that have the most problems?s", "output": "select t2.product_name from problems as t1 join product as t2 on t1.product_id = t2.product_id group by t2.product_name order by count(*) desc limit 3"}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "List the ids of the problems from the product \"voluptatem\" that are reported after 1995?", "output": "select t1.problem_id from problems as t1 join product as t2 on t1.product_id = t2.product_id where t2.product_name = \"voluptatem\" and t1.date_problem_reported > \"1995\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "What are the ids of the problems that are from the product \"voluptatem\" and are reported after 1995?", "output": "select t1.problem_id from problems as t1 join product as t2 on t1.product_id = t2.product_id where t2.product_name = \"voluptatem\" and t1.date_problem_reported > \"1995\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find the first and last name of the staff members who reported problems from the product \"rem\" but not \"aut\"?", "output": "select t3.staff_first_name, t3.staff_last_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t2.product_name = \"rem\" except select t3.staff_first_name, t3.staff_last_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t2.product_name = \"aut\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which staff members who reported problems from the product \"rem\" but not \"aut\"? Give me their first and last names.", "output": "select t3.staff_first_name, t3.staff_last_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t2.product_name = \"rem\" except select t3.staff_first_name, t3.staff_last_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t2.product_name = \"aut\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Kenton, Lacey.The staff_last_name contains values such as Champlin, Bosco. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Find the products which have problems reported by both Lacey Bosco and Kenton Champlin?", "output": "select t2.product_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t3.staff_first_name = \"Lacey\" and t3.staff_last_name = \"Bosco\" intersect select t2.product_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t3.staff_first_name = \"Kenton\" and t3.staff_last_name = \"Champlin\""}, {"instruction": "tracking_software_problems contains tables such as problem_category_codes, problem_log, problem_status_codes, product, staff, problems. Table problem_category_codes has columns such as problem_category_code, problem_category_description. problem_category_code is the primary key. Table problem_log has columns such as problem_log_id, assigned_to_staff_id, problem_id, problem_category_code, problem_status_code, log_entry_date, log_entry_description, log_entry_fix, other_log_details. problem_log_id is the primary key. The problem_status_code contains values such as Reported. Table problem_status_codes has columns such as problem_status_code, problem_status_description. problem_status_code is the primary key. The problem_status_code contains values such as Reported.The problem_status_description contains values such as Reported. Table product has columns such as product_id, product_name, product_details. product_id is the primary key. Table staff has columns such as staff_id, staff_first_name, staff_last_name, other_staff_details. staff_id is the primary key. The staff_first_name contains values such as Kenton, Lacey.The staff_last_name contains values such as Champlin, Bosco. Table problems has columns such as problem_id, product_id, closure_authorised_by_staff_id, reported_by_staff_id, date_problem_reported, date_problem_closed, problem_description, other_problem_details. problem_id is the primary key. The problem_status_code of problem_log is the foreign key of problem_status_code of problem_status_codes. The problem_id of problem_log is the foreign key of problem_id of problems. The assigned_to_staff_id of problem_log is the foreign key of staff_id of staff. The problem_category_code of problem_log is the foreign key of problem_category_code of problem_category_codes. The reported_by_staff_id of problems is the foreign key of staff_id of staff. The product_id of problems is the foreign key of product_id of product. The closure_authorised_by_staff_id of problems is the foreign key of staff_id of staff.", "input": "Which products have problems reported by both the staff named Lacey Bosco and the staff named Kenton Champlin?", "output": "select t2.product_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t3.staff_first_name = \"Lacey\" and t3.staff_last_name = \"Bosco\" intersect select t2.product_name from problems as t1 join product as t2 join staff as t3 on t1.product_id = t2.product_id and t1.reported_by_staff_id = t3.staff_id where t3.staff_first_name = \"Kenton\" and t3.staff_last_name = \"Champlin\""}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "How many branches where have more than average number of memberships are there?", "output": "select count(*) from branch where membership_amount > (select avg(membership_amount) from branch)"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What is the number of branches that have more than the average number of memberships?", "output": "select count(*) from branch where membership_amount > (select avg(membership_amount) from branch)"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show name, address road, and city for all branches sorted by open year.", "output": "select name, address_road, city from branch order by open_year"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the names, address roads, and cities of the branches ordered by opening year?", "output": "select name, address_road, city from branch order by open_year"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are names for top three branches with most number of membership?", "output": "select name from branch order by membership_amount desc limit 3"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the names for the 3 branches that have the most memberships?", "output": "select name from branch order by membership_amount desc limit 3"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show all distinct city where branches with at least 100 memberships are located.", "output": "select distinct city from branch where membership_amount >= 100"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the different cities that have more than 100 memberships?", "output": "select distinct city from branch where membership_amount >= 100"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "List all open years when at least two shops are opened.", "output": "select open_year from branch group by open_year having count(*) >= 2"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the opening years in which at least two shops opened?", "output": "select open_year from branch group by open_year having count(*) >= 2"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. The city contains values such as London. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.", "output": "select min(membership_amount), max(membership_amount) from branch where open_year = 2011 or city = 'London'"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. The city contains values such as London. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the minimum and maximum membership amounts for all branches that either opened in 2011 or are located in London?", "output": "select min(membership_amount), max(membership_amount) from branch where open_year = 2011 or city = 'London'"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show the city and the number of branches opened before 2010 for each city.", "output": "select city, count(*) from branch where open_year < 2010 group by city"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "For each city, how many branches opened before 2010?", "output": "select city, count(*) from branch where open_year < 2010 group by city"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "How many different levels do members have?", "output": "select count(distinct level) from member"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the different membership levels?", "output": "select count(distinct level) from member"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show card number, name, and hometown for all members in a descending order of level.", "output": "select card_number, name, hometown from member order by level desc"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the card numbers, names, and hometowns of every member ordered by descending level?", "output": "select card_number, name, hometown from member order by level desc"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show the membership level with most number of members.", "output": "select level from member group by level order by count(*) desc limit 1"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What is the membership level with the most people?", "output": "select level from member group by level order by count(*) desc limit 1"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show all member names and registered branch names sorted by register year.", "output": "select t3.name, t2.name from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id join member as t3 on t1.member_id = t3.member_id order by t1.register_year"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the names of the members and branches at which they are registered sorted by year of registration?", "output": "select t3.name, t2.name from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id join member as t3 on t1.member_id = t3.member_id order by t1.register_year"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show all branch names with the number of members in each branch registered after 2015.", "output": "select t2.name, count(*) from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id where t1.register_year > 2015 group by t2.branch_id"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "For each branch id, what are the names of the branches that were registered after 2015?", "output": "select t2.name, count(*) from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id where t1.register_year > 2015 group by t2.branch_id"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show member names without any registered branch.", "output": "select name from member where member_id not in (select member_id from membership_register_branch)"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the names of the members that have never registered at any branch?", "output": "select name from member where member_id not in (select member_id from membership_register_branch)"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "List the branch name and city without any registered members.", "output": "select name, city from branch where branch_id not in (select branch_id from membership_register_branch)"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the names and cities of the branches that do not have any registered members?", "output": "select name, city from branch where branch_id not in (select branch_id from membership_register_branch)"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What is the name and open year for the branch with most number of memberships registered in 2016?", "output": "select t2.name, t2.open_year from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id where t1.register_year = 2016 group by t2.branch_id order by count(*) desc limit 1"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What is the name and opening year for the branch that registered the most members in 2016?", "output": "select t2.name, t2.open_year from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id where t1.register_year = 2016 group by t2.branch_id order by count(*) desc limit 1"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show the member name and hometown who registered a branch in 2016.", "output": "select t2.name, t2.hometown from membership_register_branch as t1 join member as t2 on t1.member_id = t2.member_id where t1.register_year = 2016"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the member names and hometowns of those who registered at a branch in 2016?", "output": "select t2.name, t2.hometown from membership_register_branch as t1 join member as t2 on t1.member_id = t2.member_id where t1.register_year = 2016"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show all city with a branch opened in 2001 and a branch with more than 100 membership.", "output": "select city from branch where open_year = 2001 and membership_amount > 100"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the cities that have a branch that opened in 2001 and a branch with more than 100 members?", "output": "select city from branch where open_year = 2001 and membership_amount > 100"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Show all cities without a branch having more than 100 memberships.", "output": "select city from branch except select city from branch where membership_amount > 100"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the cities that do not have any branches with more than 100 members?", "output": "select city from branch except select city from branch where membership_amount > 100"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. The city contains values such as London. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What is the sum of total pounds of purchase in year 2018 for all branches in London?", "output": "select sum(total_pounds) from purchase as t1 join branch as t2 on t1.branch_id = t2.branch_id where t2.city = 'London' and t1.year = 2018"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. The city contains values such as London. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "How many total pounds were purchased in the year 2018 at all London branches?", "output": "select sum(total_pounds) from purchase as t1 join branch as t2 on t1.branch_id = t2.branch_id where t2.city = 'London' and t1.year = 2018"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What is the total number of purchases for members with level 6?", "output": "select count(*) from purchase as t1 join member as t2 on t1.member_id = t2.member_id where t2.level = 6"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the total purchases for members rated at level 6?", "output": "select count(*) from purchase as t1 join member as t2 on t1.member_id = t2.member_id where t2.level = 6"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. The hometown contains values such as Louisville, Kentucky, Hiram, Georgia. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "Find the name of branches where have some members whose hometown is in Louisville, Kentucky and some in Hiram, Georgia.", "output": "select t2.name from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id join member as t3 on t1.member_id = t3.member_id where t3.hometown = 'Louisville, Kentucky' intersect select t2.name from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id join member as t3 on t1.member_id = t3.member_id where t3.hometown = 'Hiram, Georgia'"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. The hometown contains values such as Louisville, Kentucky. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?", "output": "select t2.name from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id join member as t3 on t1.member_id = t3.member_id where t3.hometown = 'Louisville, Kentucky' intersect select t2.name from membership_register_branch as t1 join branch as t2 on t1.branch_id = t2.branch_id join member as t3 on t1.member_id = t3.member_id where t3.hometown = 'Hiram, Georgia'"}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "list the card number of all members whose hometown address includes word \"Kentucky\".", "output": "select card_number from member where hometown like \"%kentucky%\""}, {"instruction": "shop_membership contains tables such as member, branch, membership_register_branch, purchase. Table member has columns such as member_id, card_number, name, hometown, level. member_id is the primary key. Table branch has columns such as branch_id, name, open_year, address_road, city, membership_amount. branch_id is the primary key. Table membership_register_branch has columns such as member_id, branch_id, register_year. member_id is the primary key. Table purchase has columns such as member_id, branch_id, year, total_pounds. member_id is the primary key. The branch_id of membership_register_branch is the foreign key of branch_id of branch. The member_id of membership_register_branch is the foreign key of member_id of member. The branch_id of purchase is the foreign key of branch_id of branch. The member_id of purchase is the foreign key of member_id of member.", "input": "What are the card numbers of members from Kentucky?", "output": "select card_number from member where hometown like \"%kentucky%\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the number of students in total.", "output": "select count(*) from student"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "How many students are there in total?", "output": "select count(*) from student"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the number of voting records in total.", "output": "select count(*) from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "How many voting records do we have?", "output": "select count(*) from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct number of president votes.", "output": "select count(distinct president_vote) from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "How many distinct president votes are recorded?", "output": "select count(distinct president_vote) from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the maximum age of all the students.", "output": "select max(age) from student"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What is the oldest age among the students?", "output": "select max(age) from student"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the last names of students with major 50.", "output": "select lname from student where major = 50"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the last names of students studying major 50?", "output": "select lname from student where major = 50"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the first names of students with age above 22.", "output": "select fname from student where age > 22"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the first names of all the students aged above 22?", "output": "select fname from student where age > 22"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the majors of male (sex is M) students?", "output": "select major from student where sex = \"M\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "List the major of each male student.", "output": "select major from student where sex = \"M\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What is the average age of female (sex is F) students?", "output": "select avg(age) from student where sex = \"F\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the average age of female students.", "output": "select avg(age) from student where sex = \"F\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the maximum and minimum age of students with major 600?", "output": "select max(age), min(age) from student where major = 600"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Tell me the ages of the oldest and youngest students studying major 600.", "output": "select max(age), min(age) from student where major = 600"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as BAL. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Who are the advisors for students that live in a city with city code \"BAL\"?", "output": "select advisor from student where city_code = \"BAL\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as BAL. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Show the advisors of the students whose city of residence has city code \"BAL\".", "output": "select advisor from student where city_code = \"BAL\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Fall. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct secretary votes in the fall election cycle?", "output": "select distinct secretary_vote from voting_record where election_cycle = \"Fall\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Fall. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Return all the distinct secretary votes made in the fall election cycle.", "output": "select distinct secretary_vote from voting_record where election_cycle = \"Fall\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The registration_date contains values such as 08/30/2015, 08/30/2013. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct president votes on 08/30/2015?", "output": "select distinct president_vote from voting_record where registration_date = \"08/30/2015\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The registration_date contains values such as 08/30/2015, 08/30/2013. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Show all the distinct president votes made on 08/30/2015.", "output": "select distinct president_vote from voting_record where registration_date = \"08/30/2015\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Report the distinct registration date and the election cycle.", "output": "select distinct registration_date, election_cycle from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct registration dates and the election cycles?", "output": "select distinct registration_date, election_cycle from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Report the distinct president vote and the vice president vote.", "output": "select distinct president_vote, vice_president_vote from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "List all the distinct president votes and the vice president votes.", "output": "select distinct president_vote, vice_president_vote from voting_record"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct last names of the students who have class president votes.", "output": "select distinct t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.class_president_vote"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct last names of the students who have class president votes?", "output": "select distinct t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.class_president_vote"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct first names of the students who have class senator votes.", "output": "select distinct t1.fname from student as t1 join voting_record as t2 on t1.stuid = t2.class_senator_vote"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct first names of the students who have class president votes?", "output": "select distinct t1.fname from student as t1 join voting_record as t2 on t1.stuid = t2.class_senator_vote"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Fall. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct ages of students who have secretary votes in the fall election cycle.", "output": "select distinct t1.age from student as t1 join voting_record as t2 on t1.stuid = t2.secretary_vote where t2.election_cycle = \"Fall\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Fall. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct ages of students who have secretary votes in the fall election cycle?", "output": "select distinct t1.age from student as t1 join voting_record as t2 on t1.stuid = t2.secretary_vote where t2.election_cycle = \"Fall\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct Advisor of students who have treasurer votes in the spring election cycle.", "output": "select distinct t1.advisor from student as t1 join voting_record as t2 on t1.stuid = t2.treasurer_vote where t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Who served as an advisor for students who have treasurer votes in the spring election cycle?", "output": "select distinct t1.advisor from student as t1 join voting_record as t2 on t1.stuid = t2.treasurer_vote where t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct majors of students who have treasurer votes.", "output": "select distinct t1.major from student as t1 join voting_record as t2 on t1.stuid = t2.treasurer_vote"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct majors that students with treasurer votes are studying?", "output": "select distinct t1.major from student as t1 join voting_record as t2 on t1.stuid = t2.treasurer_vote"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the first and last names of all the female (sex is F) students who have president votes.", "output": "select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.president_vote where t1.sex = \"F\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the first and last names of all the female students who have president votes?", "output": "select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.president_vote where t1.sex = \"F\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the first and last name of all the students of age 18 who have vice president votes.", "output": "select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.vice_president_vote where t1.age = 18"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the first names and last names of the students who are 18 years old and have vice president votes.", "output": "select distinct t1.fname, t1.lname from student as t1 join voting_record as t2 on t1.stuid = t2.vice_president_vote where t1.age = 18"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Fall. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "How many male (sex is M) students have class senator votes in the fall election cycle?", "output": "select count(*) from student as t1 join voting_record as t2 on t1.stuid = class_senator_vote where t1.sex = \"M\" and t2.election_cycle = \"Fall\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Fall. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Count the number of male students who had class senator votes in the fall election cycle.", "output": "select count(*) from student as t1 join voting_record as t2 on t1.stuid = class_senator_vote where t1.sex = \"M\" and t2.election_cycle = \"Fall\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as NYC. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.", "output": "select count(*) from student as t1 join voting_record as t2 on t1.stuid = class_senator_vote where t1.city_code = \"NYC\" and t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as NYC. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Which students live in the city with code \"NYC\" and have class senator votes in the spring election cycle? Count the numbers.", "output": "select count(*) from student as t1 join voting_record as t2 on t1.stuid = class_senator_vote where t1.city_code = \"NYC\" and t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as NYC. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the average age of students who live in the city with code \"NYC\" and have secretary votes in the spring election cycle.", "output": "select avg(t1.age) from student as t1 join voting_record as t2 on t1.stuid = secretary_vote where t1.city_code = \"NYC\" and t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as NYC. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What is the average age of students who have city code \"NYC\" and have secretary votes for the spring election cycle?", "output": "select avg(t1.age) from student as t1 join voting_record as t2 on t1.stuid = secretary_vote where t1.city_code = \"NYC\" and t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.", "output": "select avg(t1.age) from student as t1 join voting_record as t2 on t1.stuid = secretary_vote where t1.sex = \"F\" and t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The election_cycle contains values such as Spring. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What is the average age of the female students with secretary votes in the spring election cycle?", "output": "select avg(t1.age) from student as t1 join voting_record as t2 on t1.stuid = secretary_vote where t1.sex = \"F\" and t2.election_cycle = \"Spring\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as PIT. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.", "output": "select distinct t1.fname from student as t1 join voting_record as t2 on t1.stuid = t2.vice_president_vote except select distinct fname from student where city_code = \"PIT\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as PIT. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT?", "output": "select distinct t1.fname from student as t1 join voting_record as t2 on t1.stuid = t2.vice_president_vote except select distinct fname from student where city_code = \"PIT\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct last names of all the students who have president votes and whose advisor is not 2192.", "output": "select distinct t1.lname from student as t1 join voting_record as t2 on t1.stuid = president_vote except select distinct lname from student where advisor = \"2192\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct last names of the students who have president votes but do not have 2192 as the advisor?", "output": "select distinct t1.lname from student as t1 join voting_record as t2 on t1.stuid = president_vote except select distinct lname from student where advisor = \"2192\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the distinct last names of all the students who have president votes and whose advisor is 8741.", "output": "select distinct t1.lname from student as t1 join voting_record as t2 on t1.stuid = president_vote intersect select distinct lname from student where advisor = \"8741\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the distinct last names of the students who have president votes and have 8741 as the advisor?", "output": "select distinct t1.lname from student as t1 join voting_record as t2 on t1.stuid = president_vote intersect select distinct lname from student where advisor = \"8741\""}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "For each advisor, report the total number of students advised by him or her.", "output": "select advisor, count(*) from student group by advisor"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "How many students does each advisor have?", "output": "select advisor, count(*) from student group by advisor"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Report all advisors that advise more than 2 students.", "output": "select advisor from student group by advisor having count(*) > 2"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Which advisors have more than two students?", "output": "select advisor from student group by advisor having count(*) > 2"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Report all majors that have less than 3 students.", "output": "select major from student group by major having count(*) < 3"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What are the majors only less than three students are studying?", "output": "select major from student group by major having count(*) < 3"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "For each election cycle, report the number of voting records.", "output": "select election_cycle, count(*) from voting_record group by election_cycle"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Count the number of voting records for each election cycle.", "output": "select election_cycle, count(*) from voting_record group by election_cycle"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Which major has the most students?", "output": "select major from student group by major order by count(*) desc limit 1"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the major that is studied by the largest number of students.", "output": "select major from student group by major order by count(*) desc limit 1"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What is the most common major among female (sex is F) students?", "output": "select major from student where sex = \"F\" group by major order by count(*) desc limit 1"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Find the major that is studied by the most female students.", "output": "select major from student where sex = \"F\" group by major order by count(*) desc limit 1"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "What is the city_code of the city that the most students live in?", "output": "select city_code from student group by city_code order by count(*) desc limit 1"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Return the code of the city that has the most students.", "output": "select city_code from student group by city_code order by count(*) desc limit 1"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Report the distinct advisors who have more than 2 students.", "output": "select advisor from student group by advisor having count(*) > 2"}, {"instruction": "voter_2 contains tables such as student, voting_record. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table voting_record has columns such as stuid, registration_date, election_cycle, president_vote, vice_president_vote, secretary_vote, treasurer_vote, class_president_vote, class_senator_vote. is the primary key. The class_senator_vote of voting_record is the foreign key of stuid of student. The class_president_vote of voting_record is the foreign key of stuid of student. The treasurer_vote of voting_record is the foreign key of stuid of student. The secretary_vote of voting_record is the foreign key of stuid of student. The vice_president_vote of voting_record is the foreign key of stuid of student. The president_vote of voting_record is the foreign key of stuid of student. The stuid of voting_record is the foreign key of stuid of student.", "input": "Which advisors are advising more than 2 students?", "output": "select advisor from student group by advisor having count(*) > 2"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many products are there?", "output": "select count(*) from products"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of products.", "output": "select count(*) from products"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many colors are there?", "output": "select count(*) from ref_colors"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of colors.", "output": "select count(*) from ref_colors"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many characteristics are there?", "output": "select count(*) from characteristics"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of characteristics.", "output": "select count(*) from characteristics"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names and buying prices of all the products?", "output": "select product_name, typical_buying_price from products"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the names and typical buying prices for all products.", "output": "select product_name, typical_buying_price from products"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "List the description of all the colors.", "output": "select color_description from ref_colors"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the descriptions for each color?", "output": "select color_description from ref_colors"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the names of all the product characteristics.", "output": "select distinct characteristic_name from characteristics"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the different names of the product characteristics?", "output": "select distinct characteristic_name from characteristics"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Spices.The product_category_description contains values such as Spices. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Spices. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names of products with category \"Spices\"?", "output": "select product_name from products where product_category_code = \"Spices\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Spices.The product_category_description contains values such as Spices. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Spices. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the names of products in the category 'Spices'.", "output": "select product_name from products where product_category_code = \"Spices\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Herbs.The product_category_description contains values such as Herbs. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Herbs. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "List the names, color descriptions and product descriptions of products with category \"Herbs\".", "output": "select t1.product_name, t2.color_description, t1.product_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where product_category_code = \"Herbs\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Herbs.The product_category_description contains values such as Herbs. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Herbs. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?", "output": "select t1.product_name, t2.color_description, t1.product_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where product_category_code = \"Herbs\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Seeds.The product_category_description contains values such as Seeds. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Seeds. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many products are there under the category \"Seeds\"?", "output": "select count(*) from products where product_category_code = \"Seeds\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Seeds.The product_category_description contains values such as Seeds. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Seeds. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of products in the category 'Seeds'.", "output": "select count(*) from products where product_category_code = \"Seeds\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Spices.The product_category_description contains values such as Spices. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Spices. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the number of products with category \"Spices\" and typically sold above 1000.", "output": "select count(*) from products where product_category_code = \"Spices\" and typical_buying_price > 1000"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Spices.The product_category_description contains values such as Spices. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Spices. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many products are in the 'Spices' category and have a typical price of over 1000?", "output": "select count(*) from products where product_category_code = \"Spices\" and typical_buying_price > 1000"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the category and typical buying price of the product with name \"cumin\"?", "output": "select product_category_code, typical_buying_price from products where product_name = \"cumin\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the category code and typical price of 'cumin'.", "output": "select product_category_code, typical_buying_price from products where product_name = \"cumin\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as flax. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Which category does the product named \"flax\" belong to?", "output": "select product_category_code from products where product_name = \"flax\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as flax. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the code of the category that the product with the name 'flax' belongs to?", "output": "select product_category_code from products where product_name = \"flax\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as yellow. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the name of the product with the color description 'yellow'?", "output": "select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'yellow'"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as yellow. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Give the name of the products that have a color description 'yellow'.", "output": "select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = 'yellow'"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the category descriptions of the products whose descriptions include letter 't'.", "output": "select t1.product_category_description from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the descriptions of the categories that products with product descriptions that contain the letter t are in?", "output": "select t1.product_category_description from ref_product_categories as t1 join products as t2 on t1.product_category_code = t2.product_category_code where t2.product_description like '%t%'"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as catnip. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the color description of the product with name \"catnip\"?", "output": "select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = \"catnip\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as catnip. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Give the color description for the product 'catnip'.", "output": "select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = \"catnip\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as chervil. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the color code and description of the product named \"chervil\"?", "output": "select t1.color_code, t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = \"chervil\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as chervil. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the color code and description for the product with the name 'chervil'.", "output": "select t1.color_code, t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t1.product_name = \"chervil\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the id and color description of the products with at least 2 characteristics.", "output": "select t1.product_id, t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code join product_characteristics as t3 on t1.product_id = t3.product_id group by t1.product_id having count(*) >= 2"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the product ids and color descriptions for products with two or more characteristics?", "output": "select t1.product_id, t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code join product_characteristics as t3 on t1.product_id = t3.product_id group by t1.product_id having count(*) >= 2"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as white. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "List all the product names with the color description \"white\".", "output": "select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = \"white\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as white. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names of products with 'white' as their color description?", "output": "select t1.product_name from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = \"white\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as yellow. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the name and typical buying and selling prices of the products that have color described as \"yellow\"?", "output": "select t1.product_name, t1.typical_buying_price, t1.typical_selling_price from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = \"yellow\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as yellow. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the names and typical buying and selling prices for products that have 'yellow' as their color description.", "output": "select t1.product_name, t1.typical_buying_price, t1.typical_selling_price from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code where t2.color_description = \"yellow\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as sesame. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many characteristics does the product named \"sesame\" have?", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id where t1.product_name = \"sesame\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as sesame. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of characteristics the product 'sesame' has.", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id where t1.product_name = \"sesame\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many distinct characteristic names does the product \"cumin\" have?", "output": "select count(distinct t3.characteristic_name) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"sesame\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of different characteristic names the product 'cumin' has.", "output": "select count(distinct t3.characteristic_name) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"sesame\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as sesame. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are all the characteristic names of product \"sesame\"?", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"sesame\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as sesame. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the characteristic names of the 'sesame' product.", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"sesame\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "List all the characteristic names and data types of product \"cumin\".", "output": "select t3.characteristic_name, t3.characteristic_data_type from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"cumin\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names and data types of the characteristics of the 'cumin' product?", "output": "select t3.characteristic_name, t3.characteristic_data_type from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"cumin\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. The characteristic_type_code contains values such as Grade.The characteristic_type_description contains values such as Grade. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_type_code contains values such as Grade. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as sesame. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "List all characteristics of product named \"sesame\" with type code \"Grade\".", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"sesame\" and t3.characteristic_type_code = \"Grade\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. The characteristic_type_code contains values such as Grade.The characteristic_type_description contains values such as Grade. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_type_code contains values such as Grade. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as sesame. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names of the characteristics of the product 'sesame' that have the characteristic type code 'Grade'?", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"sesame\" and t3.characteristic_type_code = \"Grade\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as laurel. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many characteristics does the product named \"laurel\" have?", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"laurel\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as laurel. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of characteristics of the product named 'laurel'.", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"laurel\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as flax. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the number of characteristics that the product \"flax\" has.", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"flax\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as flax. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of characteristics of the 'flax' product.", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t1.product_name = \"flax\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as red. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as fast. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the name of the products that have the color description \"red\" and have the characteristic name \"fast\".", "output": "select product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = \"red\" and t3.characteristic_name = \"fast\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as red. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as fast. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names of the products that have a color description of 'red' and the 'fast' characteristic?", "output": "select product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = \"red\" and t3.characteristic_name = \"fast\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as hot. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many products have the characteristic named \"hot\"?", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = \"hot\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as hot. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of products with the 'hot' charactersitic.", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = \"hot\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as warm. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "List the all the distinct names of the products with the characteristic name 'warm'.", "output": "select distinct t1.product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = \"warm\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as warm. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the different product names for products that have the 'warm' characteristic:?", "output": "select distinct t1.product_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id where t3.characteristic_name = \"warm\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as red. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as slow. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the number of the products that have their color described as \"red\" and have a characteristic named \"slow\".", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = \"red\" and t3.characteristic_name = \"slow\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as red. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as slow. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many products have the color description 'red' and the characteristic name 'slow'?", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = \"red\" and t3.characteristic_name = \"slow\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as white. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as hot. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the products that have the color description \"white\" or have the characteristic name \"hot\".", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = \"white\" or t3.characteristic_name = \"hot\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as white. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. The characteristic_name contains values such as hot. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many products have their color described as 'white' or have a characteristic with the name 'hot'?", "output": "select count(*) from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id join ref_colors as t4 on t1.color_code = t4.color_code where t4.color_description = \"white\" or t3.characteristic_name = \"hot\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Herbs.The product_category_description contains values such as Herbs. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Herbs. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the unit of measuerment of the product category code \"Herbs\"?", "output": "select unit_of_measure from ref_product_categories where product_category_code = \"Herbs\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Herbs.The product_category_description contains values such as Herbs. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Herbs. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the unit of measure for 'Herb' products.", "output": "select unit_of_measure from ref_product_categories where product_category_code = \"Herbs\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Spices.The product_category_description contains values such as Spices. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Spices. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the product category description of the product category with code \"Spices\".", "output": "select product_category_description from ref_product_categories where product_category_code = \"Spices\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Spices.The product_category_description contains values such as Spices. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Spices. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the description of the product category with the code 'Spices'?", "output": "select product_category_description from ref_product_categories where product_category_code = \"Spices\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Herbs.The product_category_description contains values such as Herbs. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Herbs. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the product category description and unit of measurement of category \"Herbs\"?", "output": "select product_category_description, unit_of_measure from ref_product_categories where product_category_code = \"Herbs\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The product_category_code contains values such as Herbs.The product_category_description contains values such as Herbs. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_category_code contains values such as Herbs. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the description and unit of measurement for products in the 'Herbs' category.", "output": "select product_category_description, unit_of_measure from ref_product_categories where product_category_code = \"Herbs\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the unit of measurement of product named \"cumin\"?", "output": "select t2.unit_of_measure from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = \"cumin\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as cumin. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Give the unit of measure for the product with the name 'cumin'.", "output": "select t2.unit_of_measure from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = \"cumin\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as chervil. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the unit of measurement and product category code of product named \"chervil\".", "output": "select t2.unit_of_measure, t2.product_category_code from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = \"chervil\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. The product_name contains values such as chervil. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the unit of measure and category code for the 'chervil' product?", "output": "select t2.unit_of_measure, t2.product_category_code from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code where t1.product_name = \"chervil\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as white. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The unit_of_measure contains values such as Handful . Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Find the product names that are colored 'white' but do not have unit of measurement \"Handful\".", "output": "select t1.product_name from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code join ref_colors as t3 on t1.color_code = t3.color_code where t3.color_description = \"white\" and t2.unit_of_measure != \"Handful\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. The color_description contains values such as white. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. The unit_of_measure contains values such as Handful . Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?", "output": "select t1.product_name from products as t1 join ref_product_categories as t2 on t1.product_category_code = t2.product_category_code join ref_colors as t3 on t1.color_code = t3.color_code where t3.color_description = \"white\" and t2.unit_of_measure != \"Handful\""}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the description of the color for most products?", "output": "select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) desc limit 1"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the color description that is most common across all products.", "output": "select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) desc limit 1"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the description of the color used by least products?", "output": "select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) asc limit 1"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Give the color description that is least common across products.", "output": "select t2.color_description from products as t1 join ref_colors as t2 on t1.color_code = t2.color_code group by t2.color_description order by count(*) asc limit 1"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What is the characteristic name used by most number of the products?", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name order by count(*) desc limit 1"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Return the name of the characteristic that is most common across all products.", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name order by count(*) desc limit 1"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are the names, details and data types of the characteristics which are never used by any product?", "output": "select characteristic_name, other_characteristic_details, characteristic_data_type from characteristics except select t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type from characteristics as t1 join product_characteristics as t2 on t1.characteristic_id = t2.characteristic_id"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Give the names, details, and data types of characteristics that are not found in any product.", "output": "select characteristic_name, other_characteristic_details, characteristic_data_type from characteristics except select t1.characteristic_name, t1.other_characteristic_details, t1.characteristic_data_type from characteristics as t1 join product_characteristics as t2 on t1.characteristic_id = t2.characteristic_id"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "What are characteristic names used at least twice across all products?", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name having count(*) >= 2"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Give the names of characteristics that are in two or more products?", "output": "select t3.characteristic_name from products as t1 join product_characteristics as t2 on t1.product_id = t2.product_id join characteristics as t3 on t2.characteristic_id = t3.characteristic_id group by t3.characteristic_name having count(*) >= 2"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "How many colors are never used by any product?", "output": "select count(*) from ref_colors where color_code not in ( select color_code from products )"}, {"instruction": "products_gen_characteristics contains tables such as ref_characteristic_types, ref_colors, ref_product_categories, characteristics, products, product_characteristics. Table ref_characteristic_types has columns such as characteristic_type_code, characteristic_type_description. characteristic_type_code is the primary key. Table ref_colors has columns such as color_code, color_description. color_code is the primary key. Table ref_product_categories has columns such as product_category_code, product_category_description, unit_of_measure. product_category_code is the primary key. Table characteristics has columns such as characteristic_id, characteristic_type_code, characteristic_data_type, characteristic_name, other_characteristic_details. characteristic_id is the primary key. Table products has columns such as product_id, color_code, product_category_code, product_name, typical_buying_price, typical_selling_price, product_description, other_product_details. product_id is the primary key. Table product_characteristics has columns such as product_id, characteristic_id, product_characteristic_value. is the primary key. The characteristic_type_code of characteristics is the foreign key of characteristic_type_code of ref_characteristic_types. The color_code of products is the foreign key of color_code of ref_colors. The product_category_code of products is the foreign key of product_category_code of ref_product_categories. The product_id of product_characteristics is the foreign key of product_id of products. The characteristic_id of product_characteristics is the foreign key of characteristic_id of characteristics.", "input": "Count the number of colors that are not used in any products.", "output": "select count(*) from ref_colors where color_code not in ( select color_code from products )"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "How many events are there?", "output": "select count(*) from event"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "List all the event names by year from the most recent to the oldest.", "output": "select name from event order by year desc"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "What is the name of the event that happened in the most recent year?", "output": "select name from event order by year desc limit 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "How many stadiums are there?", "output": "select count(*) from stadium"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the name of the stadium that has the maximum capacity.", "output": "select name from stadium order by capacity desc limit 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of stadiums whose capacity is smaller than the average capacity.", "output": "select name from stadium where capacity < (select avg(capacity) from stadium)"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the country that has the most stadiums.", "output": "select country from stadium group by country order by count(*) desc limit 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Which country has at most 3 stadiums listed?", "output": "select country from stadium group by country having count(*) <= 3"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Which country has both stadiums with capacity greater than 60000 and stadiums with capacity less than 50000?", "output": "select country from stadium where capacity > 60000 intersect select country from stadium where capacity < 50000"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "How many cities have a stadium that was opened before the year of 2006?", "output": "select count(distinct city) from stadium where opening_year < 2006"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "How many stadiums does each country have?", "output": "select country, count(*) from stadium group by country"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Which countries do not have a stadium that was opened after 2006?", "output": "select country from stadium except select country from stadium where opening_year > 2006"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. The country contains values such as Russia. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "How many stadiums are not in country \"Russia\"?", "output": "select count(*) from stadium where country != 'Russia'"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of all swimmers, sorted by their 100 meter scores in ascending order.", "output": "select name from swimmer order by meter_100"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "How many different countries are all the swimmers from?", "output": "select count(distinct nationality) from swimmer"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "List countries that have more than one swimmer.", "output": "select nationality, count(*) from swimmer group by nationality having count(*) > 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. The nationality contains values such as Australia. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find all 200 meter and 300 meter results of swimmers with nationality \"Australia\".", "output": "select meter_200, meter_300 from swimmer where nationality = 'Australia'"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The result contains values such as Win. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of swimmers who has a result of \"win\".", "output": "select t1.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id where result = 'Win'"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "What is the name of the stadium which held the most events?", "output": "select t1.name from stadium as t1 join event as t2 on t1.id = t2.stadium_id group by t2.stadium_id order by count(*) desc limit 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. The name contains values such as World Junior. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the name and capacity of the stadium where the event named \"World Junior\" happened.", "output": "select t1.name, t1.capacity from stadium as t1 join event as t2 on t1.id = t2.stadium_id where t2.name = 'World Junior'"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of stadiums which have never had any event.", "output": "select name from stadium where id not in (select stadium_id from event)"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the name of the swimmer who has the most records.", "output": "select t1.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id group by t2.swimmer_id order by count(*) desc limit 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the name of the swimmer who has at least 2 records.", "output": "select t1.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id group by t2.swimmer_id having count(*) >= 2"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The result contains values such as Win. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the name and nationality of the swimmer who has won (i.e., has a result of \"win\") more than 1 time.", "output": "select t1.name, t1.nationality from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id where result = 'Win' group by t2.swimmer_id having count(*) > 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of the swimmers who have no record.", "output": "select name from swimmer where id not in (select swimmer_id from record)"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The result contains values such as Win, Loss. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of the swimmers who have both \"win\" and \"loss\" results in the record.", "output": "select t1.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id where result = 'Win' intersect select t1.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id where result = 'Loss'"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. The nationality contains values such as Australia. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of stadiums that some Australian swimmers have been to.", "output": "select t4.name from swimmer as t1 join record as t2 on t1.id = t2.swimmer_id join event as t3 on t2.event_id = t3.id join stadium as t4 on t4.id = t3.stadium_id where t1.nationality = 'Australia'"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find the names of stadiums that the most swimmers have been to.", "output": "select t3.name from record as t1 join event as t2 on t1.event_id = t2.id join stadium as t3 on t3.id = t2.stadium_id group by t2.stadium_id order by count(*) desc limit 1"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "Find all details for each swimmer.", "output": "select * from swimmer"}, {"instruction": "swimming contains tables such as swimmer, stadium, event, record. Table swimmer has columns such as id, name, nationality, meter_100, meter_200, meter_300, meter_400, meter_500, meter_600, meter_700, time. id is the primary key. Table stadium has columns such as id, name, capacity, city, country, opening_year. id is the primary key. Table event has columns such as id, name, stadium_id, year. id is the primary key. Table record has columns such as id, result, swimmer_id, event_id. swimmer_id is the primary key. The stadium_id of event is the foreign key of id of stadium. The swimmer_id of record is the foreign key of id of swimmer. The event_id of record is the foreign key of id of event.", "input": "What is the average capacity of the stadiums that were opened in year 2005?", "output": "select avg(capacity) from stadium where opening_year = 2005"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "How many railways are there?", "output": "select count(*) from railway"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "List the builders of railways in ascending alphabetical order.", "output": "select builder from railway order by builder asc"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "List the wheels and locations of the railways.", "output": "select wheels, location from railway"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. The country contains values such as Australia. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "What is the maximum level of managers in countries that are not \"Australia\"?", "output": "select max(level) from manager where country != \"Australia \""}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "What is the average age for all managers?", "output": "select avg(age) from manager"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "What are the names of managers in ascending order of level?", "output": "select name from manager order by level asc"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "What are the names and arrival times of trains?", "output": "select name, arrival from train"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "What is the name of the oldest manager?", "output": "select name from manager order by age desc limit 1"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the names of trains and locations of railways they are in.", "output": "select t2.name, t1.location from railway as t1 join train as t2 on t1.railway_id = t2.railway_id"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. The name contains values such as Andaman Exp. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the builder of railways associated with the trains named \"Andaman Exp\".", "output": "select t1.builder from railway as t1 join train as t2 on t1.railway_id = t2.railway_id where t2.name = \"Andaman Exp\""}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show id and location of railways that are associated with more than one train.", "output": "select t2.railway_id, t1.location from railway as t1 join train as t2 on t1.railway_id = t2.railway_id group by t2.railway_id having count(*) > 1"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the id and builder of the railway that are associated with the most trains.", "output": "select t2.railway_id, t1.builder from railway as t1 join train as t2 on t1.railway_id = t2.railway_id group by t2.railway_id order by count(*) desc limit 1"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show different builders of railways, along with the corresponding number of railways using each builder.", "output": "select builder, count(*) from railway group by builder"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the most common builder of railways.", "output": "select builder from railway group by builder order by count(*) desc limit 1"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show different locations of railways along with the corresponding number of railways at each location.", "output": "select location, count(*) from railway group by location"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the locations that have more than one railways.", "output": "select location from railway group by location having count(*) > 1"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "List the object number of railways that do not have any trains.", "output": "select objectnumber from railway where railway_id not in (select railway_id from train)"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the countries that have both managers of age above 50 and managers of age below 46.", "output": "select country from manager where age > 50 intersect select country from manager where age < 46"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the distinct countries of managers.", "output": "select distinct country from manager"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the working years of managers in descending order of their level.", "output": "select working_year_starts from manager order by level desc"}, {"instruction": "railway contains tables such as railway, train, manager, railway_manage. Table railway has columns such as railway_id, railway, builder, built, wheels, location, objectnumber. railway_id is the primary key. Table train has columns such as train_id, train_num, name, from, arrival, railway_id. train_id is the primary key. Table manager has columns such as manager_id, name, country, working_year_starts, age, level. manager_id is the primary key. Table railway_manage has columns such as railway_id, manager_id, from_year. railway_id is the primary key. The railway_id of train is the foreign key of railway_id of railway. The railway_id of railway_manage is the foreign key of railway_id of railway. The manager_id of railway_manage is the foreign key of manager_id of manager.", "input": "Show the countries that have managers of age above 50 or below 46.", "output": "select country from manager where age > 50 or age < 46"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. The country contains values such as USA. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many addresses are there in country USA?", "output": "select count(*) from addresses where country = 'USA'"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show all distinct cities in the address record.", "output": "select distinct city from addresses"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show each state and the number of addresses in each state.", "output": "select state_province_county, count(*) from addresses group by state_province_county"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show names and phones of customers who do not have address information.", "output": "select customer_name, customer_phone from customers where customer_id not in (select customer_id from customer_address_history)"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the name of the customer who has the most orders.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the product type codes which have at least two products.", "output": "select product_type_code from products group by product_type_code having count(*) >= 2"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. The order_status_code contains values such as Completed, Part. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the names of customers who have both an order in completed status and an order in part status.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = 'Completed' intersect select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t2.order_status_code = 'Part'"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the name, phone, and payment method code for all customers in descending order of customer number.", "output": "select customer_name, customer_phone, payment_method_code from customers order by customer_number desc"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the product name and total order quantity for each product.", "output": "select t1.product_name, sum(t2.order_quantity) from products as t1 join order_items as t2 on t1.product_id = t2.product_id group by t1.product_id"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the minimum, maximum, average price for all products.", "output": "select min(product_price), max(product_price), avg(product_price) from products"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many products have a price higher than the average?", "output": "select count(*) from products where product_price > (select avg(product_price) from products)"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the customer name, customer address city, date from, and date to for each customer address history.", "output": "select t2.customer_name, t3.city, t1.date_from, t1.date_to from customer_address_history as t1 join customers as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t1.address_id = t3.address_id"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. The payment_method_code contains values such as Credit Card. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the names of customers who use Credit Card payment method and have more than 2 orders.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where t1.payment_method_code = 'Credit Card' group by t1.customer_id having count(*) > 2"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the name and phone of the customer with the most ordered product quantity?", "output": "select t1.customer_name, t1.customer_phone from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t3.order_id = t2.order_id group by t1.customer_id order by sum(t3.order_quantity) desc limit 1"}, {"instruction": "customers_and_products_contacts contains tables such as addresses, products, customers, contacts, customer_address_history, customer_orders, order_items. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table products has columns such as product_id, product_type_code, product_name, product_price. product_id is the primary key. Table customers has columns such as customer_id, payment_method_code, customer_number, customer_name, customer_address, customer_phone, customer_email. customer_id is the primary key. Table contacts has columns such as contact_id, customer_id, gender, first_name, last_name, contact_phone. contact_id is the primary key. Table customer_address_history has columns such as customer_id, address_id, date_from, date_to. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_date, order_status_code. order_id is the primary key. Table order_items has columns such as order_item_id, order_id, product_id, order_quantity. is the primary key. The address_id of customer_address_history is the foreign key of address_id of addresses. The customer_id of customer_address_history is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Show the product type and name for the products with price higher than 1000 or lower than 500.", "output": "select product_type_code, product_name from products where product_price > 1000 or product_price < 500"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of dorms only for female (F gender).", "output": "select dorm_name from dorm where gender = 'F'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the names of the all-female dorms?", "output": "select dorm_name from dorm where gender = 'F'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of dorms that can accommodate more than 300 students.", "output": "select dorm_name from dorm where student_capacity > 300"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the names of all the dorms that can accomdate more than 300 students?", "output": "select dorm_name from dorm where student_capacity > 300"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many female students (sex is F) whose age is below 25?", "output": "select count(*) from student where sex = 'F' and age < 25"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many girl students who are younger than 25?", "output": "select count(*) from student where sex = 'F' and age < 25"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first name of students who is older than 20.", "output": "select fname from student where age > 20"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the first names of all students who are older than 20?", "output": "select fname from student where age > 20"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as PHL. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first name of students living in city PHL whose age is between 20 and 25.", "output": "select fname from student where city_code = 'PHL' and age between 20 and 25"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as PHL. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the first name of the students who are in age 20 to 25 and living in PHL city?", "output": "select fname from student where city_code = 'PHL' and age between 20 and 25"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many dorms are there?", "output": "select count(*) from dorm"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many dorms are in the database?", "output": "select count(*) from dorm"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of distinct amenities.", "output": "select count(*) from dorm_amenity"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many diffrent dorm amenities are there?", "output": "select count(*) from dorm_amenity"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the total capacity of all dorms.", "output": "select sum(student_capacity) from dorm"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the total student capacity of all dorms?", "output": "select sum(student_capacity) from dorm"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many students are there?", "output": "select count(*) from student"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many students exist?", "output": "select count(*) from student"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the average age of all students living in the each city.", "output": "select avg(age), city_code from student group by city_code"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the average age for each city and what are those cities?", "output": "select avg(age), city_code from student group by city_code"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the average and total capacity of dorms for the students with gender X.", "output": "select avg(student_capacity), sum(student_capacity) from dorm where gender = 'X'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the average and total capacity for all dorms who are of gender X?", "output": "select avg(student_capacity), sum(student_capacity) from dorm where gender = 'X'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of dorms that have some amenity.", "output": "select count(distinct dormid) from has_amenity"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many dorms have amenities?", "output": "select count(distinct dormid) from has_amenity"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of dorms that do not have any amenity", "output": "select dorm_name from dorm where dormid not in (select dormid from has_amenity)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the names of all the dorms that don't have any amenities?", "output": "select dorm_name from dorm where dormid not in (select dormid from has_amenity)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of distinct gender for dorms.", "output": "select count(distinct gender) from dorm"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many different genders are there in the dorms?", "output": "select count(distinct gender) from dorm"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the capacity and gender type of the dorm whose name has substring \u2018Donor\u2019.", "output": "select student_capacity, gender from dorm where dorm_name like '%donor%'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the student capacity and type of gender for the dorm whose name as the phrase Donor in it?", "output": "select student_capacity, gender from dorm where dorm_name like '%donor%'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name and gender type of the dorms whose capacity is greater than 300 or less than 100.", "output": "select dorm_name, gender from dorm where student_capacity > 300 or student_capacity < 100"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the names and types of the dorms that have a capacity greater than 300 or less than 100?", "output": "select dorm_name, gender from dorm where student_capacity > 300 or student_capacity < 100"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the numbers of different majors and cities.", "output": "select count(distinct major), count(distinct city_code) from student"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many different majors are there and how many different city codes are there for each student?", "output": "select count(distinct major), count(distinct city_code) from student"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as Study Room, TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of dorms which have both TV Lounge and Study Room as amenities.", "output": "select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'TV Lounge' intersect select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'Study Room'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as Study Room, TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the name of the dorm with both a TV Lounge and Study Room listed as amenities?", "output": "select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'TV Lounge' intersect select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'Study Room'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as Study Room, TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of dorms which have TV Lounge but no Study Room as amenity.", "output": "select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'TV Lounge' except select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'Study Room'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the name of each dorm that has a TV Lounge but no study rooms?", "output": "select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'TV Lounge' except select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'Study Room'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as BAL. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.", "output": "select lname from student where sex = 'F' and city_code = 'BAL' union select lname from student where sex = 'M' and age < 20"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as BAL. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the last name of every student who is either female or living in a city with the code BAL or male and under 20?", "output": "select lname from student where sex = 'F' and city_code = 'BAL' union select lname from student where sex = 'M' and age < 20"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of the dorm with the largest capacity.", "output": "select dorm_name from dorm order by student_capacity desc limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the names of the dorm with the largest capacity?", "output": "select dorm_name from dorm order by student_capacity desc limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "List in alphabetic order all different amenities.", "output": "select amenity_name from dorm_amenity order by amenity_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the different dorm amenity names in alphabetical order?", "output": "select amenity_name from dorm_amenity order by amenity_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the code of city where most of students are living in.", "output": "select city_code from student group by city_code order by count(*) desc limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the code of the city with the most students?", "output": "select city_code from student group by city_code order by count(*) desc limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first and last name of students whose age is younger than the average age.", "output": "select fname, lname from student where age < (select avg(age) from student)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the first and last name of all students who are younger than average?", "output": "select fname, lname from student where age < (select avg(age) from student)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as HKG. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "List the first and last name of students who are not living in the city with code HKG, and sorted the results by their ages.", "output": "select fname, lname from student where city_code != 'HKG' order by age"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as HKG. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the first and last names of all students who are not living in the city HKG and order the results by age?", "output": "select fname, lname from student where city_code != 'HKG' order by age"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Anonymous Donor Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.", "output": "select t1.amenity_name from dorm_amenity as t1 join has_amenity as t2 on t2.amenid = t1.amenid join dorm as t3 on t2.dormid = t3.dormid where t3.dorm_name = 'Anonymous donor Hall' order by t1.amenity_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Anonymous Donor Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the amenities in alphabetical order that Anonymous Donor Hall has?", "output": "select t1.amenity_name from dorm_amenity as t1 join has_amenity as t2 on t2.amenid = t1.amenid join dorm as t3 on t2.dormid = t3.dormid where t3.dorm_name = 'Anonymous donor Hall' order by t1.amenity_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of dorms and total capacity for each gender.", "output": "select count(*), sum(student_capacity), gender from dorm group by gender"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many dorms are there and what is the total capacity for each gender?", "output": "select count(*), sum(student_capacity), gender from dorm group by gender"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the average and oldest age for students with different sex.", "output": "select avg(age), max(age), sex from student group by sex"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the average and oldest age for each gender of student?", "output": "select avg(age), max(age), sex from student group by sex"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of students in each major.", "output": "select count(*), major from student group by major"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many students are there in each major?", "output": "select count(*), major from student group by major"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number and average age of students living in each city.", "output": "select count(*), avg(age), city_code from student group by city_code"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many students live in each city and what are their average ages?", "output": "select count(*), avg(age), city_code from student group by city_code"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the average age and number of male students (with sex M) from each city.", "output": "select count(*), avg(age), city_code from student where sex = 'M' group by city_code"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the average age and how many male students are there in each city?", "output": "select count(*), avg(age), city_code from student where sex = 'M' group by city_code"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of students for the cities where have more than one student.", "output": "select count(*), city_code from student group by city_code having count(*) > 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many students are from each city, and which cities have more than one cities?", "output": "select count(*), city_code from student group by city_code having count(*) > 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first and last name of students who are not in the largest major.", "output": "select fname, lname from student where major != (select major from student group by major order by count(*) desc limit 1)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the first and last name of the students who are not in the largest major?", "output": "select fname, lname from student where major != (select major from student group by major order by count(*) desc limit 1)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of students whose age is older than the average age for each gender.", "output": "select count(*), sex from student where age > (select avg(age) from student) group by sex"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many students are older than average for each gender?", "output": "select count(*), sex from student where age > (select avg(age) from student) group by sex"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the average age of students living in each dorm and the name of dorm.", "output": "select avg(t1.age), t3.dorm_name from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid group by t3.dorm_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the average age for each dorm and what are the names of each dorm?", "output": "select avg(t1.age), t3.dorm_name from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid group by t3.dorm_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of amenities for each of the dorms that can accommodate more than 100 students.", "output": "select count(*), t1.dormid from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid where t1.student_capacity > 100 group by t1.dormid"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "For each dorm, how many amenities does it have?", "output": "select count(*), t1.dormid from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid where t1.student_capacity > 100 group by t1.dormid"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of students who is older than 20 in each dorm.", "output": "select count(*), t3.dorm_name from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t1.age > 20 group by t3.dorm_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many students are older than 20 in each dorm?", "output": "select count(*), t3.dorm_name from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t1.age > 20 group by t3.dorm_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first name of students who are living in the Smith Hall.", "output": "select t1.fname from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.dorm_name = 'Smith Hall'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the first names of all students in Smith Hall?", "output": "select t1.fname from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.dorm_name = 'Smith Hall'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the average age of students who are living in the dorm with the largest capacity.", "output": "select avg(t1.age) from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.student_capacity = (select max(student_capacity) from dorm)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the average age of students who are living in the dorm with the largest capacity?", "output": "select avg(t1.age) from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.student_capacity = (select max(student_capacity) from dorm)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the total number of students living in the male dorm (with gender M).", "output": "select count(*) from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.gender = 'M'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the total number of students who are living in a male dorm?", "output": "select count(*) from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.gender = 'M'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the number of female students (with F sex) living in Smith Hall", "output": "select count(*) from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.dorm_name = 'Smith Hall' and t1.sex = 'F'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "How many female students live in Smith Hall?", "output": "select count(*) from student as t1 join lives_in as t2 on t1.stuid = t2.stuid join dorm as t3 on t3.dormid = t2.dormid where t3.dorm_name = 'Smith Hall' and t1.sex = 'F'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of amenities Smith Hall dorm have.", "output": "select t3.amenity_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t1.dorm_name = 'Smith Hall'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the names of the amenities that Smith Hall has?", "output": "select t3.amenity_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t1.dorm_name = 'Smith Hall'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.", "output": "select t3.amenity_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t1.dorm_name = 'Smith Hall' order by t3.amenity_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. The dorm_name contains values such as Smith Hall. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What amenities does Smith Hall have in alphabetical order?", "output": "select t3.amenity_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t1.dorm_name = 'Smith Hall' order by t3.amenity_name"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of amenity that is most common in all dorms.", "output": "select t1.amenity_name from dorm_amenity as t1 join has_amenity as t2 on t1.amenid = t2.amenid group by t2.amenid order by count(*) desc limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the most common amenity in the dorms?", "output": "select t1.amenity_name from dorm_amenity as t1 join has_amenity as t2 on t1.amenid = t2.amenid group by t2.amenid order by count(*) desc limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first name of students who are living in the dorm that has most number of amenities.", "output": "select t1.fname from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid in (select t2.dormid from dorm as t3 join has_amenity as t4 on t3.dormid = t4.dormid join dorm_amenity as t5 on t4.amenid = t5.amenid group by t3.dormid order by count(*) desc limit 1)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the first names of all students who live in the dorm with the most amenities?", "output": "select t1.fname from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid in (select t2.dormid from dorm as t3 join has_amenity as t4 on t3.dormid = t4.dormid join dorm_amenity as t5 on t4.amenid = t5.amenid group by t3.dormid order by count(*) desc limit 1)"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name and capacity of the dorm with least number of amenities.", "output": "select t1.dorm_name, t1.student_capacity from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid group by t2.dormid order by count(*) limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the name and capacity of the dorm with the fewest amount of amenities?", "output": "select t1.dorm_name, t1.student_capacity from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid group by t2.dormid order by count(*) limit 1"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of dorms that do not have amenity TV Lounge.", "output": "select dorm_name from dorm except select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'TV Lounge'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the names of the dorm that does not have a TV Lounge?", "output": "select dorm_name from dorm except select t1.dorm_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid where t3.amenity_name = 'TV Lounge'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first and last name of students who are living in the dorms that have amenity TV Lounge.", "output": "select t1.fname, t1.lname from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid in (select t3.dormid from has_amenity as t3 join dorm_amenity as t4 on t3.amenid = t4.amenid where t4.amenity_name = 'TV Lounge')"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the first and last names of all students who are living in a dorm with a TV Lounge?", "output": "select t1.fname, t1.lname from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid in (select t3.dormid from has_amenity as t3 join dorm_amenity as t4 on t3.amenid = t4.amenid where t4.amenity_name = 'TV Lounge')"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the first name and age of students who are living in the dorms that do not have amenity TV Lounge.", "output": "select t1.fname, t1.age from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid not in (select t3.dormid from has_amenity as t3 join dorm_amenity as t4 on t3.amenid = t4.amenid where t4.amenity_name = 'TV Lounge')"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. The amenity_name contains values such as TV Lounge. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What is the first name and age of every student who lives in a dorm with a TV Lounge?", "output": "select t1.fname, t1.age from student as t1 join lives_in as t2 on t1.stuid = t2.stuid where t2.dormid not in (select t3.dormid from has_amenity as t3 join dorm_amenity as t4 on t3.amenid = t4.amenid where t4.amenity_name = 'TV Lounge')"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "Find the name of amenities of the dorm where the student with last name Smith is living in.", "output": "select t3.amenity_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid join lives_in as t4 on t4.dormid = t1.dormid join student as t5 on t5.stuid = t4.stuid where t5.lname = 'Smith'"}, {"instruction": "dorm_1 contains tables such as student, dorm, dorm_amenity, has_amenity, lives_in. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith. Table dorm has columns such as dormid, dorm_name, student_capacity, gender. is the primary key. Table dorm_amenity has columns such as amenid, amenity_name. is the primary key. Table has_amenity has columns such as dormid, amenid. is the primary key. Table lives_in has columns such as stuid, dormid, room_number. is the primary key. The amenid of has_amenity is the foreign key of amenid of dorm_amenity. The dormid of has_amenity is the foreign key of dormid of dorm. The dormid of lives_in is the foreign key of dormid of dorm. The stuid of lives_in is the foreign key of stuid of student.", "input": "What are the amenities in the dorm that a student who has the last name of Smith lives in?", "output": "select t3.amenity_name from dorm as t1 join has_amenity as t2 on t1.dormid = t2.dormid join dorm_amenity as t3 on t2.amenid = t3.amenid join lives_in as t4 on t4.dormid = t1.dormid join student as t5 on t5.stuid = t4.stuid where t5.lname = 'Smith'"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "How many customers are there?", "output": "select count(*) from customers"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Count the number of customers.", "output": "select count(*) from customers"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the emails and phone numbers of all the customers, ordered by email address and phone number.", "output": "select email_address, phone_number from customers order by email_address, phone_number"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are the emails and phone numbers of all customers, sorted by email address and phone number?", "output": "select email_address, phone_number from customers order by email_address, phone_number"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. The customer_type_code contains values such as Good Credit Rating. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Which city has the least number of customers whose type code is \"Good Credit Rating\"?", "output": "select town_city from customers where customer_type_code = \"Good credit Rating\" group by town_city order by count(*) limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. The customer_type_code contains values such as Good Credit Rating. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return the city with the customer type code \"Good Credit Rating\" that had the fewest customers.", "output": "select town_city from customers where customer_type_code = \"Good credit Rating\" group by town_city order by count(*) limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "List the name of all products along with the number of complaints that they have received.", "output": "select t1.product_name, count(*) from products as t1 join complaints as t2 on t1.product_id = t2.product_id group by t1.product_name"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are all the different product names, and how many complains has each received?", "output": "select t1.product_name, count(*) from products as t1 join complaints as t2 on t1.product_id = t2.product_id group by t1.product_name"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the emails of customers who has filed a complaints of the product with the most complaints.", "output": "select t1.email_address from customers as t1 join complaints as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?", "output": "select t1.email_address from customers as t1 join complaints as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Which products has been complained by the customer who has filed least amount of complaints?", "output": "select distinct t1.product_name from products as t1 join complaints as t2 on t1.product_id = t2.product_id join customers as t3 group by t3.customer_id order by count(*) limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return the names of products that have had complaints filed by the customer who has filed the fewest complaints.", "output": "select distinct t1.product_name from products as t1 join complaints as t2 on t1.product_id = t2.product_id join customers as t3 group by t3.customer_id order by count(*) limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What is the phone number of the customer who has filed the most recent complaint?", "output": "select t1.phone_number from customers as t1 join complaints as t2 on t1.customer_id = t2.customer_id order by t2.date_complaint_raised desc limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return the phone number of the customer who filed the complaint that was raised most recently.", "output": "select t1.phone_number from customers as t1 join complaints as t2 on t1.customer_id = t2.customer_id order by t2.date_complaint_raised desc limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the email and phone number of the customers who have never filed a complaint before.", "output": "select email_address, phone_number from customers where customer_id not in (select customer_id from complaints)"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are the emails and phone numbers of custoemrs who have never filed a complaint?", "output": "select email_address, phone_number from customers where customer_id not in (select customer_id from complaints)"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the phone number of all the customers and staff.", "output": "select phone_number from customers union select phone_number from staff"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are the phone numbers of all customers and all staff members?", "output": "select phone_number from customers union select phone_number from staff"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. The product_name contains values such as Chocolate. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What is the description of the product named \"Chocolate\"?", "output": "select product_description from products where product_name = \"Chocolate\""}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. The product_name contains values such as Chocolate. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return the description of the product called \"Chocolate\".", "output": "select product_description from products where product_name = \"Chocolate\""}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the name and category of the most expensive product.", "output": "select product_name, product_category_code from products order by product_price desc limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What is the name and category code of the product with the highest price?", "output": "select product_name, product_category_code from products order by product_price desc limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the prices of products which has never received a single complaint.", "output": "select product_price from products where product_id not in (select product_id from complaints)"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are the prices of products that have never gotten a complaint?", "output": "select product_price from products where product_id not in (select product_id from complaints)"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What is the average price of the products for each category?", "output": "select avg(product_price), product_category_code from products group by product_category_code"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return the average price of products that have each category code.", "output": "select avg(product_price), product_category_code from products group by product_category_code"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the last name of the staff member who processed the complaint of the cheapest product.", "output": "select t1.last_name from staff as t1 join complaints as t2 on t1.staff_id = t2.staff_id join products as t3 on t2.product_id = t3.product_id order by t3.product_price limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What is the last name of the staff member in charge of the complaint on the product with the lowest price?", "output": "select t1.last_name from staff as t1 join complaints as t2 on t1.staff_id = t2.staff_id join products as t3 on t2.product_id = t3.product_id order by t3.product_price limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Which complaint status has more than 3 records on file?", "output": "select complaint_status_code from complaints group by complaint_status_code having count(*) > 3"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return complaint status codes have more than 3 corresponding complaints?", "output": "select complaint_status_code from complaints group by complaint_status_code having count(*) > 3"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the last name of the staff whose email address contains \"wrau\".", "output": "select last_name from staff where email_address like \"%wrau%\""}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are the last names of staff with email addressed containing the substring \"wrau\"?", "output": "select last_name from staff where email_address like \"%wrau%\""}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "How many customers are there in the customer type with the most customers?", "output": "select count(*) from customers group by customer_type_code order by count(*) desc limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Count the number of customers that have the customer type that is most common.", "output": "select count(*) from customers group by customer_type_code order by count(*) desc limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What is the last name of the staff who has handled the first ever complaint?", "output": "select t1.last_name from staff as t1 join complaints as t2 on t1.staff_id = t2.staff_id order by t2.date_complaint_raised limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return the last name of the staff member who handled the complaint with the earliest date raised.", "output": "select t1.last_name from staff as t1 join complaints as t2 on t1.staff_id = t2.staff_id order by t2.date_complaint_raised limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "How many distinct complaint type codes are there in the database?", "output": "select count(distinct complaint_type_code) from complaints"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Count the number of different complaint type codes.", "output": "select count(distinct complaint_type_code) from complaints"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. The email_address contains values such as vbogisich@example.org. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the address line 1 and 2 of the customer with email \"vbogisich@example.org\".", "output": "select address_line_1, address_line_2 from customers where email_address = \"vbogisich@example.org\""}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. The email_address contains values such as vbogisich@example.org. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What are lines 1 and 2 of the addressed of the customer with the email \"vbogisich@example.org\"?", "output": "select address_line_1, address_line_2 from customers where email_address = \"vbogisich@example.org\""}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The complaint_type_code contains values such as Product Failure. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Find the number of complaints with Product Failure type for each complaint status.", "output": "select complaint_status_code, count(*) from complaints where complaint_type_code = \"Product Failure\" group by complaint_status_code"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The complaint_type_code contains values such as Product Failure. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Of complaints with the type code \"Product Failure\", how many had each different status code?", "output": "select complaint_status_code, count(*) from complaints where complaint_type_code = \"Product Failure\" group by complaint_status_code"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "What is first names of the top 5 staff who have handled the greatest number of complaints?", "output": "select t1.first_name from staff as t1 join complaints as t2 on t1.staff_id = t2.staff_id group by t2.staff_id order by count(*) limit 5"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Return the first names of the 5 staff members who have handled the most complaints.", "output": "select t1.first_name from staff as t1 join complaints as t2 on t1.staff_id = t2.staff_id group by t2.staff_id order by count(*) limit 5"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Which state has the most customers?", "output": "select state from customers group by state order by count(*) limit 1"}, {"instruction": "customer_complaints contains tables such as staff, customers, products, complaints. Table staff has columns such as staff_id, gender, first_name, last_name, email_address, phone_number. staff_id is the primary key. Table customers has columns such as customer_id, customer_type_code, address_line_1, address_line_2, town_city, state, email_address, phone_number. customer_id is the primary key. Table products has columns such as product_id, parent_product_id, product_category_code, date_product_first_available, date_product_discontinued, product_name, product_description, product_price. product_id is the primary key. Table complaints has columns such as complaint_id, product_id, customer_id, complaint_outcome_code, complaint_status_code, complaint_type_code, date_complaint_raised, date_complaint_closed, staff_id. is the primary key. The customer_id of complaints is the foreign key of customer_id of customers. The product_id of complaints is the foreign key of product_id of products. The staff_id of complaints is the foreign key of staff_id of staff.", "input": "Give the state that has the most customers.", "output": "select state from customers group by state order by count(*) limit 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "How many submissions are there?", "output": "select count(*) from submission"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Count the number of submissions.", "output": "select count(*) from submission"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "List the authors of submissions in ascending order of scores.", "output": "select author from submission order by scores asc"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Find the author for each submission and list them in ascending order of submission score.", "output": "select author from submission order by scores asc"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "What are the authors of submissions and their colleges?", "output": "select author, college from submission"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "For each submission, show the author and their affiliated college.", "output": "select author, college from submission"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. The college contains values such as Florida, Temple. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show the names of authors from college \"Florida\" or \"Temple\"", "output": "select author from submission where college = \"Florida\" or college = \"Temple\""}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. The college contains values such as Florida, Temple. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Which authors with submissions are from college \"Florida\" or \"Temple\"?", "output": "select author from submission where college = \"Florida\" or college = \"Temple\""}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "What is the average score of submissions?", "output": "select avg(scores) from submission"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Compute the average score of submissions.", "output": "select avg(scores) from submission"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "What is the author of the submission with the highest score?", "output": "select author from submission order by scores desc limit 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Find the author who achieved the highest score in a submission.", "output": "select author from submission order by scores desc limit 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show different colleges along with the number of authors of submission from each college.", "output": "select college, count(*) from submission group by college"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "For each college, return the college name and the count of authors with submissions from that college.", "output": "select college, count(*) from submission group by college"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show the most common college of authors of submissions.", "output": "select college from submission group by college order by count(*) desc limit 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Which college has the most authors with submissions?", "output": "select college from submission group by college order by count(*) desc limit 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show the colleges that have both authors with submission score larger than 90 and authors with submission score smaller than 80.", "output": "select college from submission where scores > 90 intersect select college from submission where scores < 80"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Which colleges have both authors with submission score above 90 and authors with submission score below 80?", "output": "select college from submission where scores > 90 intersect select college from submission where scores < 80"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show the authors of submissions and the acceptance results of their submissions.", "output": "select t2.author, t1.result from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "For each submission, find its author and acceptance result.", "output": "select t2.author, t1.result from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show the result of the submission with the highest score.", "output": "select t1.result from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id order by t2.scores desc limit 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Which submission received the highest score in acceptance result. Show me the result.", "output": "select t1.result from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id order by t2.scores desc limit 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show each author and the number of workshops they submitted to.", "output": "select t2.author, count(distinct t1.workshop_id) from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id group by t2.author"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "How many workshops did each author submit to? Return the author name and the number of workshops.", "output": "select t2.author, count(distinct t1.workshop_id) from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id group by t2.author"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show the authors who have submissions to more than one workshop.", "output": "select t2.author from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id group by t2.author having count(distinct t1.workshop_id) > 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Which authors have submitted to more than one workshop?", "output": "select t2.author from acceptance as t1 join submission as t2 on t1.submission_id = t2.submission_id group by t2.author having count(distinct t1.workshop_id) > 1"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Show the date and venue of each workshop in ascending alphabetical order of the venue.", "output": "select date, venue from workshop order by venue"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Sort the each workshop in alphabetical order of the venue. Return the date and venue of each workshop.", "output": "select date, venue from workshop order by venue"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "List the authors who do not have submission to any workshop.", "output": "select author from submission where submission_id not in (select submission_id from acceptance)"}, {"instruction": "workshop_paper contains tables such as workshop, submission, acceptance. Table workshop has columns such as workshop_id, date, venue, name. workshop_id is the primary key. Table submission has columns such as submission_id, scores, author, college. submission_id is the primary key. Table acceptance has columns such as submission_id, workshop_id, result. submission_id is the primary key. The workshop_id of acceptance is the foreign key of workshop_id of workshop. The submission_id of acceptance is the foreign key of submission_id of submission.", "input": "Which authors did not submit to any workshop?", "output": "select author from submission where submission_id not in (select submission_id from acceptance)"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Find the number of investors in total.", "output": "select count(*) from investors"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show all investor details.", "output": "select investor_details from investors"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show all distinct lot details.", "output": "select distinct lot_details from lots"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the maximum amount of transaction.", "output": "select max(amount_of_transaction) from transactions"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show all date and share count of transactions.", "output": "select date_of_transaction, share_count from transactions"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What is the total share of transactions?", "output": "select sum(share_count) from transactions"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as PUR. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as PUR. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show all transaction ids with transaction code 'PUR'.", "output": "select transaction_id from transactions where transaction_type_code = 'PUR'"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as SALE.The transaction_type_description contains values such as Sale. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as SALE. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show all dates of transactions whose type code is \"SALE\".", "output": "select date_of_transaction from transactions where transaction_type_code = \"SALE\""}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as SALE.The transaction_type_description contains values such as Sale. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as SALE. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the average amount of transactions with type code \"SALE\".", "output": "select avg(amount_of_transaction) from transactions where transaction_type_code = \"SALE\""}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as PUR. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as PUR. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the description of transaction type with code \"PUR\".", "output": "select transaction_type_description from ref_transaction_types where transaction_type_code = \"PUR\""}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as PUR. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as PUR. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the minimum amount of transactions whose type code is \"PUR\" and whose share count is bigger than 50.", "output": "select min(amount_of_transaction) from transactions where transaction_type_code = \"PUR\" and share_count > 50"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the maximum share count of transactions where the amount is smaller than 10000", "output": "select max(share_count) from transactions where amount_of_transaction < 10000"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.", "output": "select date_of_transaction from transactions where share_count > 100 or amount_of_transaction > 1000"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the transaction type descriptions and dates if the share count is smaller than 10.", "output": "select t1.transaction_type_description, t2.date_of_transaction from ref_transaction_types as t1 join transactions as t2 on t1.transaction_type_code = t2.transaction_type_code where t2.share_count < 10"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show details of all investors if they make any transaction with share count greater than 100.", "output": "select t1.investor_details from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id where t2.share_count > 100"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "How many distinct transaction types are used in the transactions?", "output": "select count(distinct transaction_type_code) from transactions"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Return the lot details and investor ids.", "output": "select lot_details, investor_id from lots"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Return the lot details of lots that belong to investors with details \"l\"?", "output": "select t2.lot_details from investors as t1 join lots as t2 on t1.investor_id = t2.investor_id where t1.investor_details = \"l\""}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_description contains values such as Purchase. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What are the purchase details of transactions with amount bigger than 10000?", "output": "select t1.purchase_details from purchases as t1 join transactions as t2 on t1.purchase_transaction_id = t2.transaction_id where t2.amount_of_transaction > 10000"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as SALE.The transaction_type_description contains values such as Sale. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as SALE. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What are the sale details and dates of transactions with amount smaller than 3000?", "output": "select t1.sales_details, t2.date_of_transaction from sales as t1 join transactions as t2 on t1.sales_transaction_id = t2.transaction_id where t2.amount_of_transaction < 3000"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What are the lot details of lots associated with transactions with share count smaller than 50?", "output": "select t1.lot_details from lots as t1 join transactions_lots as t2 on t1.lot_id = t2.transaction_id join transactions as t3 on t2.transaction_id = t3.transaction_id where t3.share_count < 50"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as PUR. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as PUR. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is \"PUR\"?", "output": "select t1.lot_details from lots as t1 join transactions_lots as t2 on t1.lot_id = t2.transaction_id join transactions as t3 on t2.transaction_id = t3.transaction_id where t3.share_count > 100 and t3.transaction_type_code = \"PUR\""}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the average transaction amount for different transaction types.", "output": "select transaction_type_code, avg(amount_of_transaction) from transactions group by transaction_type_code"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the maximum and minimum share count of different transaction types.", "output": "select transaction_type_code, max(share_count), min(share_count) from transactions group by transaction_type_code"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the average share count of transactions for different investors.", "output": "select investor_id, avg(share_count) from transactions group by investor_id"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the average share count of transactions each each investor, ordered by average share count.", "output": "select investor_id, avg(share_count) from transactions group by investor_id order by avg(share_count)"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the average amount of transactions for different investors.", "output": "select investor_id, avg(amount_of_transaction) from transactions group by investor_id"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the average amount of transactions for different lots.", "output": "select t2.lot_id, avg(amount_of_transaction) from transactions as t1 join transactions_lots as t2 on t1.transaction_id = t2.transaction_id group by t2.lot_id"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the average amount of transactions for different lots, ordered by average amount of transactions.", "output": "select t2.lot_id, avg(amount_of_transaction) from transactions as t1 join transactions_lots as t2 on t1.transaction_id = t2.transaction_id group by t2.lot_id order by avg(amount_of_transaction)"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as SALE.The transaction_type_description contains values such as Sale. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as SALE. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the number of transactions with transaction type code \"SALE\" for different investors if it is larger than 0.", "output": "select investor_id, count(*) from transactions where transaction_type_code = \"SALE\" group by investor_id"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the number of transactions for different investors.", "output": "select investor_id, count(*) from transactions group by investor_id"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the transaction type code that occurs the fewest times.", "output": "select transaction_type_code from transactions group by transaction_type_code order by count(*) asc limit 1"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the transaction type code that occurs the most frequently.", "output": "select transaction_type_code from transactions group by transaction_type_code order by count(*) desc limit 1"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the description of the transaction type that occurs most frequently.", "output": "select t1.transaction_type_description from ref_transaction_types as t1 join transactions as t2 on t1.transaction_type_code = t2.transaction_type_code group by t1.transaction_type_code order by count(*) desc limit 1"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the id and details of the investor that has the largest number of transactions.", "output": "select t2.investor_id, t1.investor_details from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id group by t2.investor_id order by count(*) desc limit 1"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the id and details for the investors who have the top 3 number of transactions.", "output": "select t2.investor_id, t1.investor_details from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id group by t2.investor_id order by count(*) desc limit 3"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the ids of the investors who have at least two transactions.", "output": "select t2.investor_id from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id group by t2.investor_id having count(*) >= 2"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_code contains values such as SALE.The transaction_type_description contains values such as Sale. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. The transaction_type_code contains values such as SALE. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "Show the ids and details of the investors who have at least two transactions with type code \"SALE\".", "output": "select t2.investor_id, t1.investor_details from investors as t1 join transactions as t2 on t1.investor_id = t2.investor_id where t2.transaction_type_code = \"SALE\" group by t2.investor_id having count(*) >= 2"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What are the dates of transactions with at least 100 share count or amount bigger than 100?", "output": "select date_of_transaction from transactions where share_count >= 100 or amount_of_transaction >= 100"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. The transaction_type_description contains values such as Purchase, Sale. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What are the details of all sales and purchases?", "output": "select sales_details from sales union select purchase_details from purchases"}, {"instruction": "tracking_share_transactions contains tables such as investors, lots, ref_transaction_types, transactions, sales, purchases, transactions_lots. Table investors has columns such as investor_id, investor_details. investor_id is the primary key. Table lots has columns such as lot_id, investor_id, lot_details. lot_id is the primary key. Table ref_transaction_types has columns such as transaction_type_code, transaction_type_description. transaction_type_code is the primary key. Table transactions has columns such as transaction_id, investor_id, transaction_type_code, date_of_transaction, amount_of_transaction, share_count, other_details. transaction_id is the primary key. Table sales has columns such as sales_transaction_id, sales_details. sales_transaction_id is the primary key. Table purchases has columns such as purchase_transaction_id, purchase_details. is the primary key. Table transactions_lots has columns such as transaction_id, lot_id. is the primary key. The investor_id of lots is the foreign key of investor_id of investors. The transaction_type_code of transactions is the foreign key of transaction_type_code of ref_transaction_types. The investor_id of transactions is the foreign key of investor_id of investors. The sales_transaction_id of sales is the foreign key of transaction_id of transactions. The purchase_transaction_id of purchases is the foreign key of transaction_id of transactions. The transaction_id of transactions_lots is the foreign key of transaction_id of transactions. The lot_id of transactions_lots is the foreign key of lot_id of lots.", "input": "What are the details of the lots which are not used in any transactions?", "output": "select lot_details from lots except select t1.lot_details from lots as t1 join transactions_lots as t2 on t1.lot_id = t2.lot_id"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "How many available hotels are there in total?", "output": "select count(*) from hotels"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the total number of available hotels.", "output": "select count(*) from hotels"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the price ranges of hotels?", "output": "select price_range from hotels"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Tell me the price ranges for all the hotels.", "output": "select price_range from hotels"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show all distinct location names.", "output": "select distinct location_name from locations"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the distinct location names?", "output": "select distinct location_name from locations"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the names and details of all the staff members.", "output": "select name, other_details from staff"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the name and detail of each staff member?", "output": "select name, other_details from staff"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show details of all visitors.", "output": "select tourist_details from visitors"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the detail of each visitor?", "output": "select tourist_details from visitors"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the price ranges of hotels with 5 star ratings.", "output": "select price_range from hotels where star_rating_code = \"5\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the price ranges of five star hotels?", "output": "select price_range from hotels where star_rating_code = \"5\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the average price range of hotels that have 5 star ratings and allow pets.", "output": "select avg(price_range) from hotels where star_rating_code = \"5\" and pets_allowed_yn = 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the average price range of five star hotels that allow pets?", "output": "select avg(price_range) from hotels where star_rating_code = \"5\" and pets_allowed_yn = 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The location_name contains values such as UK Gallery. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as gallery. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as UK gallery. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the address of the location \"UK Gallery\"?", "output": "select address from locations where location_name = \"UK Gallery\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The location_name contains values such as UK Gallery. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as gallery. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as UK gallery. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the address of the location named \"UK Gallery\".", "output": "select address from locations where location_name = \"UK Gallery\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The location_name contains values such as UK Gallery. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as gallery. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as UK gallery. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the detail of the location UK Gallery?", "output": "select other_details from locations where location_name = \"UK Gallery\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The location_name contains values such as UK Gallery. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as gallery. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as UK gallery. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Return the detail of the location named \"UK Gallery\".", "output": "select other_details from locations where location_name = \"UK Gallery\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which location names contain the word \"film\"?", "output": "select location_name from locations where location_name like \"%film%\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find all the locations whose names contain the word \"film\".", "output": "select location_name from locations where location_name like \"%film%\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "How many distinct names are associated with all the photos?", "output": "select count(distinct name) from photos"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Count the number of distinct names associated with the photos.", "output": "select count(distinct name) from photos"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the distinct visit dates?", "output": "select distinct visit_date from visits"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find all the distinct visit dates.", "output": "select distinct visit_date from visits"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names of the tourist attractions that can be accessed by bus?", "output": "select name from tourist_attractions where how_to_get_there = \"bus\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which tourist attractions can we get to by bus? Tell me the names of the attractions.", "output": "select name from tourist_attractions where how_to_get_there = \"bus\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk, bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?", "output": "select name, opening_hours from tourist_attractions where how_to_get_there = \"bus\" or how_to_get_there = \"walk\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk, bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the names and opening hours of the tourist attractions that we get to by bus or walk.", "output": "select name, opening_hours from tourist_attractions where how_to_get_there = \"bus\" or how_to_get_there = \"walk\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the star rating descriptions of the hotels with price above 10000?", "output": "select t2.star_rating_description from hotels as t1 join ref_hotel_star_ratings as t2 on t1.star_rating_code = t2.star_rating_code where t1.price_range > 10000"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Give me the star rating descriptions of the hotels that cost more than 10000.", "output": "select t2.star_rating_description from hotels as t1 join ref_hotel_star_ratings as t2 on t1.star_rating_code = t2.star_rating_code where t1.price_range > 10000"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as museum. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the details and opening hours of the museums?", "output": "select t1.museum_details, t2.opening_hours from museums as t1 join tourist_attractions as t2 on t1.museum_id = t2.tourist_attraction_id"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as museum. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Give me the detail and opening hour for each museum.", "output": "select t1.museum_details, t2.opening_hours from museums as t1 join tourist_attractions as t2 on t1.museum_id = t2.tourist_attraction_id"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. The name contains values such as game1. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the name of the tourist attraction that is associated with the photo \"game1\"?", "output": "select t2.name from photos as t1 join tourist_attractions as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id where t1.name = \"game1\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. The name contains values such as game1. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which tourist attraction is associated with the photo \"game1\"? Return its name.", "output": "select t2.name from photos as t1 join tourist_attractions as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id where t1.name = \"game1\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The location_name contains values such as Film Festival. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as film festival. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names and descriptions of the photos taken at the tourist attraction \"film festival\"?", "output": "select t1.name, t1.description from photos as t1 join tourist_attractions as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id where t2.name = \"film festival\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The location_name contains values such as Film Festival. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as film festival. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the names and descriptions of the photos taken at the tourist attraction called \"film festival\".", "output": "select t1.name, t1.description from photos as t1 join tourist_attractions as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id where t2.name = \"film festival\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the details and ways to get to tourist attractions related to royal family?", "output": "select t1.royal_family_details, t2.how_to_get_there from royal_family as t1 join tourist_attractions as t2 on t1.royal_family_id = t2.tourist_attraction_id"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which tourist attractions are related to royal family? Tell me their details and how we can get there.", "output": "select t1.royal_family_details, t2.how_to_get_there from royal_family as t1 join tourist_attractions as t2 on t1.royal_family_id = t2.tourist_attraction_id"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the details of the shops that can be accessed by walk?", "output": "select t1.shop_details from shops as t1 join tourist_attractions as t2 on t1.shop_id = t2.tourist_attraction_id where t2.how_to_get_there = \"walk\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the details of the shops that can be reached by walk.", "output": "select t1.shop_details from shops as t1 join tourist_attractions as t2 on t1.shop_id = t2.tourist_attraction_id where t2.how_to_get_there = \"walk\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as museum. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as US museum. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the name of the staff that is in charge of the attraction named \"US museum\"?", "output": "select t1.name from staff as t1 join tourist_attractions as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id where t2.name = \"US museum\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. The attraction_type_description contains values such as museum. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as US museum. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Tell me the name of the staff in charge of the attraction called \"US museum\".", "output": "select t1.name from staff as t1 join tourist_attractions as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id where t2.name = \"US museum\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk, bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the details of the markets that can be accessed by walk or bus?", "output": "select t1.market_details from street_markets as t1 join tourist_attractions as t2 on t1.market_id = t2.tourist_attraction_id where t2.how_to_get_there = \"walk\" or t2.how_to_get_there = \"bus\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk, bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the details of all the markets that are accessible by walk or bus.", "output": "select t1.market_details from street_markets as t1 join tourist_attractions as t2 on t1.market_id = t2.tourist_attraction_id where t2.how_to_get_there = \"walk\" or t2.how_to_get_there = \"bus\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the visit date and details of the visitor whose detail is 'Vincent'?", "output": "select t2.visit_date, t2.visit_details from visitors as t1 join visits as t2 on t1.tourist_id = t2.tourist_id where t1.tourist_details = \"Vincent\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the visit date and details of the tourist whose detail is 'Vincent'", "output": "select t2.visit_date, t2.visit_details from visitors as t1 join visits as t2 on t1.tourist_id = t2.tourist_id where t1.tourist_details = \"Vincent\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which tourist attractions does the visitor with detail 'Vincent' visit?", "output": "select t1.name from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id join visitors as t3 on t2.tourist_id = t3.tourist_id where t3.tourist_details = \"Vincent\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the tourist attractions visited by the tourist whose detail is 'Vincent'.", "output": "select t1.name from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id join visitors as t3 on t2.tourist_id = t3.tourist_id where t3.tourist_details = \"Vincent\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent, Vivian. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names of the tourist attractions and the dates when the tourists named Vincent or Vivian visited there?", "output": "select t1.name, t3.visit_date from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Vincent\" or t2.tourist_details = \"Vivian\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent, Vivian. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "For each tourist attraction, return its name and the date when the tourists named Vincent or Vivian visited there.", "output": "select t1.name, t3.visit_date from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Vincent\" or t2.tourist_details = \"Vivian\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the average price of hotels for each star rating code.", "output": "select star_rating_code, avg(price_range) from hotels group by star_rating_code"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What is the average price range of hotels for each each star rating code?", "output": "select star_rating_code, avg(price_range) from hotels group by star_rating_code"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the average price of hotels for different pet policy.", "output": "select pets_allowed_yn, avg(price_range) from hotels group by pets_allowed_yn"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the average prices of hotels grouped by their pet policy.", "output": "select pets_allowed_yn, avg(price_range) from hotels group by pets_allowed_yn"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the id and star rating of each hotel, ordered by its price from low to high.", "output": "select hotel_id, star_rating_code from hotels order by price_range asc"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the id and star rating of each hotel and sort them in increasing order of price.", "output": "select hotel_id, star_rating_code from hotels order by price_range asc"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the details of the top 3 most expensive hotels.", "output": "select other_hotel_details from hotels order by price_range desc limit 3"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the details of the three most expensive hotels?", "output": "select other_hotel_details from hotels order by price_range desc limit 3"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the details and star ratings of the 3 least expensive hotels.", "output": "select other_hotel_details, star_rating_code from hotels order by price_range asc limit 3"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. The star_rating_description contains values such as star. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the details and star ratings of the three hotels with the lowest price ranges?", "output": "select other_hotel_details, star_rating_code from hotels order by price_range asc limit 3"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the transportation method most people choose to get to tourist attractions.", "output": "select how_to_get_there from tourist_attractions group by how_to_get_there order by count(*) desc limit 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which transportation method is used the most often to get to tourist attractions?", "output": "select how_to_get_there from tourist_attractions group by how_to_get_there order by count(*) desc limit 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the description and code of the attraction type most tourist attractions belong to.", "output": "select t1.attraction_type_description, t2.attraction_type_code from ref_attraction_types as t1 join tourist_attractions as t2 on t1.attraction_type_code = t2.attraction_type_code group by t2.attraction_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which attraction type does the most tourist attractions belong to? Tell me its attraction type description and code.", "output": "select t1.attraction_type_description, t2.attraction_type_code from ref_attraction_types as t1 join tourist_attractions as t2 on t1.attraction_type_code = t2.attraction_type_code group by t2.attraction_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.", "output": "select how_to_get_there, count(*) from tourist_attractions group by how_to_get_there"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "List all the possible ways to get to attractions, together with the number of attractions accessible by these methods.", "output": "select how_to_get_there, count(*) from tourist_attractions group by how_to_get_there"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show different tourist attractions' names, ids, and the corresponding number of visits.", "output": "select t1.name, t2.tourist_attraction_id, count(*) from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the name, id and the corresponding number of visits for each tourist attraction?", "output": "select t1.name, t2.tourist_attraction_id, count(*) from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the names and ids of tourist attractions that are visited at least two times.", "output": "select t1.name, t2.tourist_attraction_id from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id having count(*) >= 2"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which tourist attractions are visited at least twice? Give me their names and ids.", "output": "select t1.name, t2.tourist_attraction_id from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id having count(*) >= 2"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Show the names and ids of tourist attractions that are visited at most once.", "output": "select t1.name, t1.tourist_attraction_id from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id having count(*) <= 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names and ids of the tourist attractions that are visited at most once?", "output": "select t1.name, t1.tourist_attraction_id from tourist_attractions as t1 join visits as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id group by t2.tourist_attraction_id having count(*) <= 1"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The address contains values such as 660 Shea Crescent. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names of tourist attractions that can be reached by walk or is at address 660 Shea Crescent?", "output": "select t2.name from locations as t1 join tourist_attractions as t2 on t1.location_id = t2.location_id where t1.address = \"660 shea Crescent\" or t2.how_to_get_there = \"walk\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The address contains values such as 660 Shea Crescent. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as walk. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.", "output": "select t2.name from locations as t1 join tourist_attractions as t2 on t1.location_id = t2.location_id where t1.address = \"660 shea Crescent\" or t2.how_to_get_there = \"walk\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. The feature_details contains values such as parking, shopping. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as parking. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names of the tourist attractions that have parking or shopping as their feature details?", "output": "select t1.name from tourist_attractions as t1 join tourist_attraction_features as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id join features as t3 on t2.feature_id = t3.feature_id where t3.feature_details = 'park' union select t1.name from tourist_attractions as t1 join tourist_attraction_features as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id join features as t3 on t2.feature_id = t3.feature_id where t3.feature_details = 'shopping'"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. The feature_details contains values such as parking, shopping. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The name contains values such as parking. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?", "output": "select t1.name from tourist_attractions as t1 join tourist_attraction_features as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id join features as t3 on t2.feature_id = t3.feature_id where t3.feature_details = 'park' union select t1.name from tourist_attractions as t1 join tourist_attraction_features as t2 on t1.tourist_attraction_id = t2.tourist_attraction_id join features as t3 on t2.feature_id = t3.feature_id where t3.feature_details = 'shopping'"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The address contains values such as 254 Ottilie Junction. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?", "output": "select t2.name from locations as t1 join tourist_attractions as t2 on t1.location_id = t2.location_id where t1.address = \"254 ottilie Junction\" or t2.how_to_get_there = \"bus\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. The address contains values such as 254 Ottilie Junction. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. The how_to_get_there contains values such as bus. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the names of the tourist attractions that is either accessible by bus or at address 254 Ottilie Junction.", "output": "select t2.name from locations as t1 join tourist_attractions as t2 on t1.location_id = t2.location_id where t1.address = \"254 ottilie Junction\" or t2.how_to_get_there = \"bus\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent, Marcelle. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names of the tourist attractions Vincent and Marcelle visit?", "output": "select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Vincent\" intersect select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Marcelle\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Vincent, Marcelle. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Which tourist attractions do the tourists Vincent and Marcelle visit? Tell me the names of the attractions.", "output": "select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Vincent\" intersect select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Marcelle\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Rosalind, Alison. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "What are the names of tourist attraction that Alison visited but Rosalind did not visit?", "output": "select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Alison\" except select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Rosalind\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. The tourist_details contains values such as Rosalind, Alison. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Find the the names of the tourist attractions that the tourist named Alison visited but Rosalind did not visit.", "output": "select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Alison\" except select t1.name from tourist_attractions as t1 join visitors as t2 join visits as t3 on t1.tourist_attraction_id = t3.tourist_attraction_id and t2.tourist_id = t3.tourist_id where t2.tourist_details = \"Rosalind\""}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "How many tourists did not make any visit?", "output": "select count(*) from visitors where tourist_id not in ( select tourist_id from visits )"}, {"instruction": "cre_Theme_park contains tables such as ref_hotel_star_ratings, locations, ref_attraction_types, visitors, features, hotels, tourist_attractions, street_markets, shops, museums, royal_family, theme_parks, visits, photos, staff, tourist_attraction_features. Table ref_hotel_star_ratings has columns such as star_rating_code, star_rating_description. star_rating_code is the primary key. Table locations has columns such as location_id, location_name, address, other_details. location_id is the primary key. Table ref_attraction_types has columns such as attraction_type_code, attraction_type_description. attraction_type_code is the primary key. Table visitors has columns such as tourist_id, tourist_details. tourist_id is the primary key. Table features has columns such as feature_id, feature_details. feature_id is the primary key. Table hotels has columns such as hotel_id, star_rating_code, pets_allowed_yn, price_range, other_hotel_details. hotel_id is the primary key. Table tourist_attractions has columns such as tourist_attraction_id, attraction_type_code, location_id, how_to_get_there, name, description, opening_hours, other_details. tourist_attraction_id is the primary key. Table street_markets has columns such as market_id, market_details. market_id is the primary key. Table shops has columns such as shop_id, shop_details. shop_id is the primary key. Table museums has columns such as museum_id, museum_details. museum_id is the primary key. Table royal_family has columns such as royal_family_id, royal_family_details. royal_family_id is the primary key. Table theme_parks has columns such as theme_park_id, theme_park_details. theme_park_id is the primary key. Table visits has columns such as visit_id, tourist_attraction_id, tourist_id, visit_date, visit_details. visit_id is the primary key. Table photos has columns such as photo_id, tourist_attraction_id, name, description, filename, other_details. photo_id is the primary key. Table staff has columns such as staff_id, tourist_attraction_id, name, other_details. staff_id is the primary key. Table tourist_attraction_features has columns such as tourist_attraction_id, feature_id. tourist_attraction_id is the primary key. The star_rating_code of hotels is the foreign key of star_rating_code of ref_hotel_star_ratings. The attraction_type_code of tourist_attractions is the foreign key of attraction_type_code of ref_attraction_types. The location_id of tourist_attractions is the foreign key of location_id of locations. The market_id of street_markets is the foreign key of tourist_attraction_id of tourist_attractions. The shop_id of shops is the foreign key of tourist_attraction_id of tourist_attractions. The museum_id of museums is the foreign key of tourist_attraction_id of tourist_attractions. The royal_family_id of royal_family is the foreign key of tourist_attraction_id of tourist_attractions. The theme_park_id of theme_parks is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_id of visits is the foreign key of tourist_id of visitors. The tourist_attraction_id of visits is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of photos is the foreign key of tourist_attraction_id of tourist_attractions. The tourist_attraction_id of staff is the foreign key of tourist_attraction_id of tourist_attractions. The feature_id of tourist_attraction_features is the foreign key of feature_id of features. The tourist_attraction_id of tourist_attraction_features is the foreign key of tourist_attraction_id of tourist_attractions.", "input": "Count the number of tourists who did not visit any place.", "output": "select count(*) from visitors where tourist_id not in ( select tourist_id from visits )"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many video games exist?", "output": "select count(*) from video_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many video games do you have?", "output": "select count(*) from video_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many video game types exist?", "output": "select count(distinct gtype) from video_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the count of different game types?", "output": "select count(distinct gtype) from video_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all video game types.", "output": "select distinct gtype from video_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the different types of video games?", "output": "select distinct gtype from video_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all video games and their types in the order of their names.", "output": "select gname, gtype from video_games order by gname"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the names of all the video games and their types in alphabetical order?", "output": "select gname, gtype from video_games order by gname"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. The gtype contains values such as Collectible card game. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all video games with type Collectible card game.", "output": "select gname from video_games where gtype = \"Collectible card game\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the names of all video games that are collectible cards?", "output": "select gname from video_games where gtype = \"Collectible card game\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. The gname contains values such as Call of Destiny. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the type of video game Call of Destiny.", "output": "select gtype from video_games where gname = \"Call of Destiny\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. The gname contains values such as Call of Destiny. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What type of game is Call of Destiny?", "output": "select gtype from video_games where gname = \"Call of Destiny\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. The gtype contains values such as Massively multiplayer online game. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many video games have type Massively multiplayer online game?", "output": "select count(*) from video_games where gtype = \"Massively multiplayer online game\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. The gtype contains values such as Massively multiplayer online game. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Count the number of video games with Massively multiplayer online game type .", "output": "select count(*) from video_games where gtype = \"Massively multiplayer online game\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all video game types and the number of video games in each type.", "output": "select gtype, count(*) from video_games group by gtype"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the types of video games and how many are in each type?", "output": "select gtype, count(*) from video_games group by gtype"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Which game type has most number of games?", "output": "select gtype from video_games group by gtype order by count(*) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What type has the most games?", "output": "select gtype from video_games group by gtype order by count(*) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Which game type has least number of games?", "output": "select gtype from video_games group by gtype order by count(*) limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the type with the fewest games?", "output": "select gtype from video_games group by gtype order by count(*) limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as CHI. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show ids for all students who live in CHI.", "output": "select stuid from student where city_code = \"CHI\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The city_code contains values such as CHI. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all students who live in CHI?", "output": "select stuid from student where city_code = \"CHI\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show ids for all students who have advisor 1121.", "output": "select stuid from student where advisor = 1121"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all students who have advisor number 1121?", "output": "select stuid from student where advisor = 1121"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show first name for all students with major 600.", "output": "select fname from student where major = 600"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the first names for all students who are from the major numbered 600?", "output": "select fname from student where major = 600"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show the average, minimum, and maximum age for different majors.", "output": "select major, avg(age), min(age), max(age) from student group by major"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the average, minimum, and max ages for each of the different majors?", "output": "select major, avg(age), min(age), max(age) from student group by major"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all advisors who have at least two students.", "output": "select advisor from student group by advisor having count(*) >= 2"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the advisors", "output": "select advisor from student group by advisor having count(*) >= 2"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many sports do we have?", "output": "select count(distinct sportname) from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many different types of sports do we offer?", "output": "select count(distinct sportname) from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many students play sports?", "output": "select count(distinct stuid) from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many different students are involved in sports?", "output": "select count(distinct stuid) from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "List ids for all student who are on scholarship.", "output": "select stuid from sportsinfo where onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids for all sporty students who are on scholarship?", "output": "select stuid from sportsinfo where onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show last names for all student who are on scholarship.", "output": "select t2.lname from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t1.onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the last names for all scholarship students?", "output": "select t2.lname from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t1.onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many games are played for all students?", "output": "select sum(gamesplayed) from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the total number of games played?", "output": "select sum(gamesplayed) from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many games are played for all football games by students on scholarship?", "output": "select sum(gamesplayed) from sportsinfo where sportname = \"Football\" and onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the total number of all football games played by scholarship students?", "output": "select sum(gamesplayed) from sportsinfo where sportname = \"Football\" and onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all sport name and the number of students.", "output": "select sportname, count(*) from sportsinfo group by sportname"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many students play each sport?", "output": "select sportname, count(*) from sportsinfo group by sportname"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all student IDs with the number of sports and total number of games played", "output": "select stuid, count(*), sum(gamesplayed) from sportsinfo group by stuid"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all students along with how many sports and games did they play?", "output": "select stuid, count(*), sum(gamesplayed) from sportsinfo group by stuid"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all student IDs with more than total 10 hours per week on all sports played.", "output": "select stuid from sportsinfo group by stuid having sum(hoursperweek) > 10"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the student IDs for everybody who worked for more than 10 hours per week on all sports?", "output": "select stuid from sportsinfo group by stuid having sum(hoursperweek) > 10"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the first name and last name of the student who have most number of sports?", "output": "select t2.fname, t2.lname from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid group by t1.stuid order by count(*) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the first and last name of the student who played the most sports?", "output": "select t2.fname, t2.lname from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid group by t1.stuid order by count(*) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Which sport has most number of students on scholarship?", "output": "select sportname from sportsinfo where onscholarship = 'Y' group by sportname order by count(*) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the sport with the most scholarship students?", "output": "select sportname from sportsinfo where onscholarship = 'Y' group by sportname order by count(*) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show student ids who don't have any sports.", "output": "select stuid from student except select stuid from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all students who don't play sports?", "output": "select stuid from student except select stuid from sportsinfo"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show student ids who are on scholarship and have major 600.", "output": "select stuid from student where major = 600 intersect select stuid from sportsinfo where onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the student ids for those on scholarship in major number 600?", "output": "select stuid from student where major = 600 intersect select stuid from sportsinfo where onscholarship = 'Y'"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show student ids who are female and play football.", "output": "select stuid from student where sex = 'F' intersect select stuid from sportsinfo where sportname = \"Football\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all female students who play football?", "output": "select stuid from student where sex = 'F' intersect select stuid from sportsinfo where sportname = \"Football\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all male student ids who don't play football.", "output": "select stuid from student where sex = 'M' except select stuid from sportsinfo where sportname = \"Football\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all male students who do not play football?", "output": "select stuid from student where sex = 'M' except select stuid from sportsinfo where sportname = \"Football\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Shieber.The fname contains values such as David. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show total hours per week and number of games played for student David Shieber.", "output": "select sum(hoursperweek), sum(gamesplayed) from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t2.fname = \"David\" and t2.lname = \"Shieber\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Shieber.The fname contains values such as David. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the total number of hours per work and number of games played by David Shieber?", "output": "select sum(hoursperweek), sum(gamesplayed) from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t2.fname = \"David\" and t2.lname = \"Shieber\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show total hours per week and number of games played for students under 20.", "output": "select sum(hoursperweek), sum(gamesplayed) from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t2.age < 20"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the total number of hours per week and number of games played by students under 20?", "output": "select sum(hoursperweek), sum(gamesplayed) from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t2.age < 20"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many students play video games?", "output": "select count(distinct stuid) from plays_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "How many different students play games?", "output": "select count(distinct stuid) from plays_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show ids of students who don't play video game.", "output": "select stuid from student except select stuid from plays_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all students who are not video game players?", "output": "select stuid from student except select stuid from plays_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show ids of students who play video game and play sports.", "output": "select stuid from sportsinfo intersect select stuid from plays_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all students who played video games and sports?", "output": "select stuid from sportsinfo intersect select stuid from plays_games"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all game ids and the number of hours played.", "output": "select gameid, sum(hours_played) from plays_games group by gameid"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are ids and total number of hours played for each game?", "output": "select gameid, sum(hours_played) from plays_games group by gameid"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all student ids and the number of hours played.", "output": "select stuid, sum(hours_played) from plays_games group by stuid"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the ids of all students and number of hours played?", "output": "select stuid, sum(hours_played) from plays_games group by stuid"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show the game name that has most number of hours played.", "output": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid group by t1.gameid order by sum(hours_played) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the name of the game that has been played the most?", "output": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid group by t1.gameid order by sum(hours_played) desc limit 1"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all game names played by at least 1000 hours.", "output": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid group by t1.gameid having sum(hours_played) >= 1000"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the names of all the games that have been played for at least 1000 hours?", "output": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid group by t1.gameid having sum(hours_played) >= 1000"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Show all game names played by Linda Smith", "output": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid join student as t3 on t3.stuid = t1.stuid where t3.lname = \"Smith\" and t3.fname = \"Linda\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the names of all games played by Linda Smith?", "output": "select gname from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid join student as t3 on t3.stuid = t1.stuid where t3.lname = \"Smith\" and t3.fname = \"Linda\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football, Lacrosse. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Find the last and first name of students who are playing Football or Lacrosse.", "output": "select t2.lname, t2.fname from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t1.sportname = \"Football\" or t1.sportname = \"Lacrosse\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football, Lacrosse. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What is the first and last name of all students who play Football or Lacrosse?", "output": "select t2.lname, t2.fname from sportsinfo as t1 join student as t2 on t1.stuid = t2.stuid where t1.sportname = \"Football\" or t1.sportname = \"Lacrosse\""}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football, Lacrosse. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Find the first name and age of the students who are playing both Football and Lacrosse.", "output": "select fname, age from student where stuid in (select stuid from sportsinfo where sportname = \"Football\" intersect select stuid from sportsinfo where sportname = \"Lacrosse\")"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The sportname contains values such as Football, Lacrosse. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "What are the first names and ages of all students who are playing both Football and Lacrosse?", "output": "select fname, age from student where stuid in (select stuid from sportsinfo where sportname = \"Football\" intersect select stuid from sportsinfo where sportname = \"Lacrosse\")"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. The gname contains values such as Call of Destiny, Works of Widenius. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.", "output": "select lname, sex from student where stuid in (select t1.stuid from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid where t2.gname = \"Call of Destiny\" intersect select t1.stuid from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid where t2.gname = \"Works of Widenius\")"}, {"instruction": "game_1 contains tables such as student, video_games, plays_games, sportsinfo. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table video_games has columns such as gameid, gname, gtype. gameid is the primary key. The gname contains values such as Call of Destiny, Works of Widenius. Table plays_games has columns such as stuid, gameid, hours_played. is the primary key. Table sportsinfo has columns such as stuid, sportname, hoursperweek, gamesplayed, onscholarship. is the primary key. The stuid of plays_games is the foreign key of stuid of student. The gameid of plays_games is the foreign key of gameid of video_games. The stuid of sportsinfo is the foreign key of stuid of student.", "input": "what is the last name and gender of all students who played both Call of Destiny and Works of Widenius?", "output": "select lname, sex from student where stuid in (select t1.stuid from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid where t2.gname = \"Call of Destiny\" intersect select t1.stuid from plays_games as t1 join video_games as t2 on t1.gameid = t2.gameid where t2.gname = \"Works of Widenius\")"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name of all customers.", "output": "select customer_name from customers"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the names of all the customers?", "output": "select customer_name from customers"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many customers are there?", "output": "select count(*) from customers"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Return the total number of distinct customers.", "output": "select count(*) from customers"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the average amount of items ordered in each order?", "output": "select avg(order_quantity) from order_items"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the average order quantity per order.", "output": "select avg(order_quantity) from order_items"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The payment_method contains values such as Cash. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the names of customers who use payment method \"Cash\"?", "output": "select customer_name from customers where payment_method = \"Cash\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The payment_method contains values such as Cash. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which customers use \"Cash\" for payment method? Return the customer names.", "output": "select customer_name from customers where payment_method = \"Cash\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the \"date became customers\" of the customers whose ID is between 10 and 20.", "output": "select date_became_customer from customers where customer_id between 10 and 20"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the dates when customers with ids between 10 and 20 became customers?", "output": "select date_became_customer from customers where customer_id between 10 and 20"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which payment method is used by most customers?", "output": "select payment_method from customers group by payment_method order by count(*) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the payment method that is used most frequently.", "output": "select payment_method from customers group by payment_method order by count(*) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the names of customers using the most popular payment method?", "output": "select customer_name from customers where payment_method = (select payment_method from customers group by payment_method order by count(*) desc limit 1)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name of the customers who use the most frequently used payment method.", "output": "select customer_name from customers where payment_method = (select payment_method from customers group by payment_method order by count(*) desc limit 1)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are all the payment methods?", "output": "select distinct payment_method from customers"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Return all the distinct payment methods used by customers.", "output": "select distinct payment_method from customers"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the details of all products?", "output": "select distinct product_details from products"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Return the the details of all products.", "output": "select distinct product_details from products"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name of all customers whose name contains \"Alex\".", "output": "select customer_name from customers where customer_name like \"%alex%\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which customer's name contains \"Alex\"? Find the full name.", "output": "select customer_name from customers where customer_name like \"%alex%\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. The product_details contains values such as Americano, Latte. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the detail of products whose detail contains the word \"Latte\" or the word \"Americano\"", "output": "select product_details from products where product_details like \"%latte%\" or product_details like \"%americano%\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. The product_details contains values such as Americano, Latte. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which product's detail contains the word \"Latte\" or \"Americano\"? Return the full detail.", "output": "select product_details from products where product_details like \"%latte%\" or product_details like \"%americano%\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Maudie Kertzmann. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the address content of the customer named \"Maudie Kertzmann\"?", "output": "select t3.address_content from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t1.customer_name = \"Maudie Kertzmann\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Maudie Kertzmann. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Return the address content for the customer whose name is \"Maudie Kertzmann\".", "output": "select t3.address_content from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t1.customer_name = \"Maudie Kertzmann\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The city contains values such as Lake Geovannyton. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many customers are living in city \"Lake Geovannyton\"?", "output": "select count(*) from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t3.city = \"Lake Geovannyton\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The city contains values such as Lake Geovannyton. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the number of customers who live in the city called Lake Geovannyton.", "output": "select count(*) from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t3.city = \"Lake Geovannyton\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The state_province_county contains values such as Colorado. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name of customers who are living in Colorado?", "output": "select t1.customer_name from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t3.state_province_county = \"Colorado\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The state_province_county contains values such as Colorado. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the names of customers who live in Colorado state?", "output": "select t1.customer_name from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id where t3.state_province_county = \"Colorado\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the list of cities that no customer is living in.", "output": "select city from addresses where city not in ( select distinct t3.city from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the cities no customers live in?", "output": "select city from addresses where city not in ( select distinct t3.city from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which city has the most customers living in?", "output": "select t3.city from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id group by t3.city order by count(*) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the city where the most customers live.", "output": "select t3.city from customers as t1 join customer_addresses as t2 on t1.customer_id = t2.customer_id join addresses as t3 on t2.address_id = t3.address_id group by t3.city order by count(*) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Retrieve the list of all cities.", "output": "select distinct city from addresses"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "List all the distinct cities", "output": "select distinct city from addresses"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the city with post code 255.", "output": "select city from addresses where zip_postcode = 255"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which city is post code 255 located in?", "output": "select city from addresses where zip_postcode = 255"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the state and country of all cities with post code starting with 4.", "output": "select state_province_county, country from addresses where zip_postcode like \"4%\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the state and country of all the cities that have post codes starting with 4.\\", "output": "select state_province_county, country from addresses where zip_postcode like \"4%\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "List the countries having more than 4 addresses listed.", "output": "select country from addresses group by country having count(address_id) > 4"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "For which countries are there more than four distinct addresses listed?", "output": "select country from addresses group by country having count(address_id) > 4"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "List all the contact channel codes that were used less than 5 times.", "output": "select channel_code from customer_contact_channels group by channel_code having count(customer_id) < 5"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which contact channel codes were used less than 5 times?", "output": "select channel_code from customer_contact_channels group by channel_code having count(customer_id) < 5"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Tillman Ernser. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which contact channel has been used by the customer with name \"Tillman Ernser\"?", "output": "select distinct channel_code from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Tillman Ernser\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Tillman Ernser. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the contact channel code that was used by the customer named \"Tillman Ernser\".", "output": "select distinct channel_code from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Tillman Ernser\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Tillman Ernser. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the \"active to date\" of the latest contact channel used by \"Tillman Ernser\"?", "output": "select max(t2.active_to_date) from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Tillman Ernser\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Tillman Ernser. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Return the the \"active to date\" of the latest contact channel used by the customer named \"Tillman Ernser\".", "output": "select max(t2.active_to_date) from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Tillman Ernser\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the average time span of contact channels in the database?", "output": "select avg(active_to_date - active_from_date) from customer_contact_channels"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Compute the average active time span of contact channels.", "output": "select avg(active_to_date - active_from_date) from customer_contact_channels"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the channel code and contact number of the customer contact channel that was active for the longest time?", "output": "select channel_code, contact_number from customer_contact_channels where active_to_date - active_from_date = (select active_to_date - active_from_date from customer_contact_channels order by (active_to_date - active_from_date) desc limit 1)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Return the channel code and contact number of the customer contact channel whose active duration was the longest.", "output": "select channel_code, contact_number from customer_contact_channels where active_to_date - active_from_date = (select active_to_date - active_from_date from customer_contact_channels order by (active_to_date - active_from_date) desc limit 1)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. The channel_code contains values such as Email. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name and active date of the customer that use email as the contact channel.", "output": "select t1.customer_name, t2.active_from_date from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t2.channel_code = 'Email'"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. The channel_code contains values such as Email. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the name and active date of the customers whose contact channel code is email?", "output": "select t1.customer_name, t2.active_from_date from customers as t1 join customer_contact_channels as t2 on t1.customer_id = t2.customer_id where t2.channel_code = 'Email'"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the name of the customer that made the order with the largest quantity?", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t3.order_quantity = ( select max(order_quantity) from order_items)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name of the customer who made the order of the largest amount of goods.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t3.order_quantity = ( select max(order_quantity) from order_items)"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the name of the customer that has purchased the most items?", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Give me the name of the customer who ordered the most items in total.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the payment method of the customer that has purchased the least quantity of items?", "output": "select t1.payment_method from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Tell me the payment method used by the customer who ordered the least amount of goods in total.", "output": "select t1.payment_method from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id group by t1.customer_name order by sum(t3.order_quantity) limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Rodrick Heaney. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many types of products have Rodrick Heaney bought in total?", "output": "select count(distinct t3.product_id) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = \"Rodrick Heaney\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Rodrick Heaney. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the number of distinct products Rodrick Heaney has bought so far.", "output": "select count(distinct t3.product_id) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = \"Rodrick Heaney\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Rodrick Heaney. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the total quantity of products purchased by \"Rodrick Heaney\"?", "output": "select sum(t3.order_quantity) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = \"Rodrick Heaney\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The customer_name contains values such as Rodrick Heaney. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Tell me the total quantity of products bought by the customer called \"Rodrick Heaney\".", "output": "select sum(t3.order_quantity) from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id where t1.customer_name = \"Rodrick Heaney\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_status contains values such as Cancelled. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many customers have at least one order with status \"Cancelled\"?", "output": "select count(distinct customer_id) from customer_orders where order_status = \"Cancelled\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_status contains values such as Cancelled. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Return the number of customers who have at least one order with \"Cancelled\" status.", "output": "select count(distinct customer_id) from customer_orders where order_status = \"Cancelled\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_details contains values such as Second time. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "How many orders have detail \"Second time\"?", "output": "select count(*) from customer_orders where order_details = \"Second time\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_details contains values such as Second time. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Tell me the number of orders with \"Second time\" as order detail.", "output": "select count(*) from customer_orders where order_details = \"Second time\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_status contains values such as Delivered. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the customer name and date of the orders that have the status \"Delivered\".", "output": "select t1.customer_name, t2.order_date from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where order_status = \"Delivered\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_status contains values such as Delivered. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the customer name and date of the orders whose status is \"Delivered\".", "output": "select t1.customer_name, t2.order_date from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id where order_status = \"Delivered\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_status contains values such as Cancelled. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the total number of products that are in orders with status \"Cancelled\"?", "output": "select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_status = \"Cancelled\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_status contains values such as Cancelled. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the total quantity of products associated with the orders in the \"Cancelled\" status.", "output": "select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_status = \"Cancelled\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_date contains values such as 2018-03-17 07:13:53. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the total amount of products ordered before 2018-03-17 07:13:53.", "output": "select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_date < \"2018-03-17 07:13:53\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. The order_date contains values such as 2018-03-17 07:13:53. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the total amount of products purchased before 2018-03-17 07:13:53?", "output": "select sum(t2.order_quantity) from customer_orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.order_date < \"2018-03-17 07:13:53\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Who made the latest order?", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id order by t2.order_date desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name of the customer who made an order most recently.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id order by t2.order_date desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Which product has been ordered most number of times?", "output": "select t2.product_details from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by count(*) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the most frequently ordered product? Tell me the detail of the product", "output": "select t2.product_details from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by count(*) desc limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name and ID of the product whose total order quantity is the largest.", "output": "select t2.product_details, t2.product_id from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by sum(t1.order_quantity) limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the name and ID of the product bought the most.", "output": "select t2.product_details, t2.product_id from order_items as t1 join products as t2 on t1.product_id = t2.product_id group by t1.product_id order by sum(t1.order_quantity) limit 1"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The city contains values such as East Julianaside, Gleasonmouth.The state_province_county contains values such as Arizona, Texas. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", "output": "select address_content from addresses where city = \"East Julianaside\" and state_province_county = \"Texas\" union select address_content from addresses where city = \"Gleasonmouth\" and state_province_county = \"Arizona\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. The city contains values such as East Julianaside, Gleasonmouth.The state_province_county contains values such as Arizona, Texas. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are all the addresses in East Julianaside, Texas or in Gleasonmouth, Arizona.", "output": "select address_content from addresses where city = \"East Julianaside\" and state_province_county = \"Texas\" union select address_content from addresses where city = \"Gleasonmouth\" and state_province_county = \"Arizona\""}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The payment_method contains values such as Cash. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the name of customers who did not pay with Cash.", "output": "select customer_name from customers where payment_method != 'Cash'"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. The payment_method contains values such as Cash. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What is the name of customers who do not use Cash as payment method.", "output": "select customer_name from customers where payment_method != 'Cash'"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. The product_details contains values such as Latte. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the names of customers who never ordered product Latte.", "output": "select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'Latte'"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. The product_details contains values such as Latte. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are names of customers who never ordered product Latte.", "output": "select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'Latte'"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the names of customers who never placed an order.", "output": "select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the names of customers who never made an order.", "output": "select customer_name from customers except select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. The product_details contains values such as Americano, Latte. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "Find the names of customers who ordered both products Latte and Americano.", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'Latte' intersect select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'Americano'"}, {"instruction": "customers_and_addresses contains tables such as addresses, products, customers, customer_addresses, customer_contact_channels, customer_orders, order_items. Table addresses has columns such as address_id, address_content, city, zip_postcode, state_province_county, country, other_address_details. address_id is the primary key. Table products has columns such as product_id, product_details. product_id is the primary key. The product_details contains values such as Americano, Latte. Table customers has columns such as customer_id, payment_method, customer_name, date_became_customer, other_customer_details. customer_id is the primary key. Table customer_addresses has columns such as customer_id, address_id, date_address_from, address_type, date_address_to. is the primary key. Table customer_contact_channels has columns such as customer_id, channel_code, active_from_date, active_to_date, contact_number. is the primary key. Table customer_orders has columns such as order_id, customer_id, order_status, order_date, order_details. order_id is the primary key. Table order_items has columns such as order_id, product_id, order_quantity. is the primary key. The customer_id of customer_addresses is the foreign key of customer_id of customers. The address_id of customer_addresses is the foreign key of address_id of addresses. The customer_id of customer_contact_channels is the foreign key of customer_id of customers. The customer_id of customer_orders is the foreign key of customer_id of customers. The order_id of order_items is the foreign key of order_id of customer_orders. The product_id of order_items is the foreign key of product_id of products.", "input": "What are the names of customers who have purchased both products Latte and Americano?", "output": "select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'Latte' intersect select t1.customer_name from customers as t1 join customer_orders as t2 on t1.customer_id = t2.customer_id join order_items as t3 on t2.order_id = t3.order_id join products as t4 on t3.product_id = t4.product_id where t4.product_details = 'Americano'"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "How many artists are there?", "output": "select count(*) from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Count the number of artists.", "output": "select count(*) from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "List the age of all music artists.", "output": "select age from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the ages of all music artists?", "output": "select age from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What is the average age of all artists?", "output": "select avg(age) from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the average age across all artists.", "output": "select avg(age) from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. The artist contains values such as Triumfall. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the famous titles of the artist \"Triumfall\"?", "output": "select famous_title from artist where artist = \"Triumfall\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. The artist contains values such as Triumfall. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the famous titles of the artist called \"Triumfall\".", "output": "select famous_title from artist where artist = \"Triumfall\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the distinct Famous release dates?", "output": "select distinct(famous_release_date) from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Give the distinct famous release dates for all artists.", "output": "select distinct(famous_release_date) from artist"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the dates of ceremony and the results of all music festivals", "output": "select date_of_ceremony, result from music_festival"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the dates of ceremony and results for each music festival?", "output": "select date_of_ceremony, result from music_festival"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The result contains values such as Awarded. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the category of music festivals with result \"Awarded\"?", "output": "select category from music_festival where result = \"Awarded\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The result contains values such as Awarded. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the categories of music festivals that have the result \"Awarded\".", "output": "select category from music_festival where result = \"Awarded\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the maximum and minimum week on top of all volumes?", "output": "select max(weeks_on_top), min(weeks_on_top) from volume"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Give the maximum and minimum weeks on top across all volumes.", "output": "select max(weeks_on_top), min(weeks_on_top) from volume"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the songs in volumes with more than 1 week on top?", "output": "select song from volume where weeks_on_top > 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Give the songs included in volumes that have more than 1 week on top.", "output": "select song from volume where weeks_on_top > 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Please list all songs in volumes in ascending alphabetical order.", "output": "select song from volume order by song"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the the songs in volumes, listed in ascending order?", "output": "select song from volume order by song"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "How many distinct artists do the volumes associate to?", "output": "select count(distinct artist_id) from volume"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Count the number of distinct artists who have volumes.", "output": "select count(distinct artist_id) from volume"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Please show the date of ceremony of the volumes that last more than 2 weeks on top.", "output": "select t1.date_of_ceremony from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t2.weeks_on_top > 2"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the dates of ceremony at music festivals corresponding to volumes that lasted more than 2 weeks on top?", "output": "select t1.date_of_ceremony from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t2.weeks_on_top > 2"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The result contains values such as Nominated. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Please show the songs that have result \"nominated\" at music festivals.", "output": "select t2.song from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t1.result = \"Nominated\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the songs in volumes that have resulted in a nomination at music festivals?", "output": "select t2.song from music_festival as t1 join volume as t2 on t1.volume = t2.volume_id where t1.result = \"Nominated\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. The artist contains values such as Gorgoroth. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the issue dates of volumes associated with the artist \"Gorgoroth\"?", "output": "select t2.issue_date from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.artist = \"Gorgoroth\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. The artist contains values such as Gorgoroth. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the issue dates of volumes that are by the artist named Gorgoroth.", "output": "select t2.issue_date from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.artist = \"Gorgoroth\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the songs in volumes associated with the artist aged 32 or older?", "output": "select t2.song from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age >= 32"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return names of songs in volumes that are by artists that are at least 32 years old.", "output": "select t2.song from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age >= 32"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What is the average weeks on top of volumes associated with the artist aged 25 or younger?", "output": "select avg(t2.weeks_on_top) from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age <= 25"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the average number of weeks on top for volumes by artists that are at most 25 years old.", "output": "select avg(t2.weeks_on_top) from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age <= 25"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the famous title of the artists associated with volumes with more than 2 weeks on top?", "output": "select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.", "output": "select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Please list the age and famous title of artists in descending order of age.", "output": "select famous_title, age from artist order by age desc"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the famous titles and ages of each artist, listed in descending order by age?", "output": "select famous_title, age from artist order by age desc"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What is the famous release date of the artist with the oldest age?", "output": "select famous_release_date from artist order by age desc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the famous release date for the oldest artist.", "output": "select famous_release_date from artist order by age desc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Please show the categories of the music festivals and the count.", "output": "select category, count(*) from music_festival group by category"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the number of music festivals of each category.", "output": "select category, count(*) from music_festival group by category"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What is the most common result of the music festival?", "output": "select result from music_festival group by result order by count(*) desc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the result that is most frequent at music festivals.", "output": "select result from music_festival group by result order by count(*) desc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Please show the categories of the music festivals with count more than 1.", "output": "select category from music_festival group by category having count(*) > 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the categories of music festivals for which there have been more than 1 music festival?", "output": "select category from music_festival group by category having count(*) > 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What is the song in the volume with the maximum weeks on top?", "output": "select song from volume order by weeks_on_top desc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the song in the volume that has spent the most weeks on top?", "output": "select song from volume order by weeks_on_top desc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Find the famous titles of artists that do not have any volume.", "output": "select famous_title from artist where artist_id not in(select artist_id from volume)"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the famous titles of artists who do not have any volumes?", "output": "select famous_title from artist where artist_id not in(select artist_id from volume)"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Show the famous titles of the artists with both volumes that lasted more than 2 weeks on top and volumes that lasted less than 2 weeks on top.", "output": "select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2 intersect select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top < 2"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the famous titles of artists who have not only had volumes that spent more than 2 weeks on top but also volumes that spent less than 2 weeks on top?", "output": "select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top > 2 intersect select t1.famous_title from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t2.weeks_on_top < 2"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The category contains values such as Best Song.The result contains values such as Awarded. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the date of ceremony of music festivals with category \"Best Song\" and result \"Awarded\"?", "output": "select date_of_ceremony from music_festival where category = \"Best Song\" and result = \"Awarded\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The category contains values such as Best Song.The result contains values such as Awarded. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the dates of ceremony corresponding to music festivals that had the category \"Best Song\" and result \"Awarded\".", "output": "select date_of_ceremony from music_festival where category = \"Best Song\" and result = \"Awarded\""}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What is the issue date of the volume with the minimum weeks on top?", "output": "select issue_date from volume order by weeks_on_top asc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the issue date of the volume that has spent the fewest weeks on top.", "output": "select issue_date from volume order by weeks_on_top asc limit 1"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "How many distinct artists have volumes?", "output": "select count(distinct artist_id) from volume"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Count the number of artists who have had volumes.", "output": "select count(distinct artist_id) from volume"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Please show the results of music festivals and the number of music festivals that have had each, ordered by this count.", "output": "select result, count(*) from music_festival group by result order by count(*) desc"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "How many music festivals have had each kind of result, ordered descending by count?", "output": "select result, count(*) from music_festival group by result order by count(*) desc"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "What are the issue dates of volumes associated with the artist aged 23 or younger?", "output": "select issue_date from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age <= 23"}, {"instruction": "music_4 contains tables such as artist, volume, music_festival. Table artist has columns such as artist_id, artist, age, famous_title, famous_release_date. artist_id is the primary key. Table volume has columns such as volume_id, volume_issue, issue_date, weeks_on_top, song, artist_id. volume_id is the primary key. Table music_festival has columns such as id, music_festival, date_of_ceremony, category, volume, result. id is the primary key. The artist_id of volume is the foreign key of artist_id of artist. The volume of music_festival is the foreign key of volume_id of volume.", "input": "Return the issue dates of volumes by artists who are at most 23 years old?", "output": "select issue_date from artist as t1 join volume as t2 on t1.artist_id = t2.artist_id where t1.age <= 23"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "How many roller coasters are there?", "output": "select count(*) from roller_coaster"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "List the names of roller coasters by ascending order of length.", "output": "select name from roller_coaster order by length asc"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "What are the lengths and heights of roller coasters?", "output": "select length, height from roller_coaster"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The languages contains values such as German. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "List the names of countries whose language is not \"German\".", "output": "select name from country where languages != \"German\""}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Show the statuses of roller coasters longer than 3300 or higher than 100.", "output": "select status from roller_coaster where length > 3300 or height > 100"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "What are the speeds of the longest roller coaster?", "output": "select speed from roller_coaster order by length desc limit 1"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "What is the average speed of roller coasters?", "output": "select avg(speed) from roller_coaster"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Show the different statuses and the numbers of roller coasters for each status.", "output": "select status, count(*) from roller_coaster group by status"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Please show the most common status of roller coasters.", "output": "select status from roller_coaster group by status order by count(*) desc limit 1"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "List the status shared by more than two roller coaster.", "output": "select status from roller_coaster group by status having count(*) > 2"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Show the park of the roller coaster with the highest speed.", "output": "select park from roller_coaster order by speed desc limit 1"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Show the names of roller coasters and names of country they are in.", "output": "select t2.name, t1.name from country as t1 join roller_coaster as t2 on t1.country_id = t2.country_id"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Show the names of countries that have more than one roller coaster.", "output": "select t1.name from country as t1 join roller_coaster as t2 on t1.country_id = t2.country_id group by t1.name having count(*) > 1"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Show the name and population of the country that has the highest roller coaster.", "output": "select t1.name, t1.population from country as t1 join roller_coaster as t2 on t1.country_id = t2.country_id order by t2.height desc limit 1"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "Show the names of countries and the average speed of roller coasters from each country.", "output": "select t1.name, avg(t2.speed) from country as t1 join roller_coaster as t2 on t1.country_id = t2.country_id group by t1.name"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "How many countries do not have an roller coaster longer than 3000?", "output": "select count(*) from country where country_id not in ( select country_id from roller_coaster where length > 3000 )"}, {"instruction": "roller_coaster contains tables such as roller_coaster, country. Table roller_coaster has columns such as roller_coaster_id, name, park, country_id, length, height, speed, opened, status. roller_coaster_id is the primary key. Table country has columns such as country_id, name, population, area, languages. country_id is the primary key. The country_id of roller_coaster is the foreign key of country_id of country.", "input": "What are the country names, area and population which has both roller coasters with speed higher", "output": "select t1.name, t1.area, t1.population from country as t1 join roller_coaster as t2 on t1.country_id = t2.country_id where t2.speed > 60 intersect select t1.name, t1.area, t1.population from country as t1 join roller_coaster as t2 on t1.country_id = t2.country_id where t2.speed < 55"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "How many different captain ranks are there?", "output": "select count(distinct rank) from captain"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Count the number of different ranks of captain.", "output": "select count(distinct rank) from captain"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "How many captains are in each rank?", "output": "select count(*), rank from captain group by rank"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Count the number of captains that have each rank.", "output": "select count(*), rank from captain group by rank"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "How many captains with younger than 50 are in each rank?", "output": "select count(*), rank from captain where age < 50 group by rank"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Count the number of captains younger than 50 of each rank.", "output": "select count(*), rank from captain where age < 50 group by rank"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Sort all captain names by their ages from old to young.", "output": "select name from captain order by age desc"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the names of captains, sorted by age descending?", "output": "select name from captain order by age desc"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the name, class and rank of all captains.", "output": "select name, class, rank from captain"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the names, classes, and ranks of all captains?", "output": "select name, class, rank from captain"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Which rank is the most common among captains?", "output": "select rank from captain group by rank order by count(*) desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Return the rank for which there are the fewest captains.", "output": "select rank from captain group by rank order by count(*) desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Which classes have more than two captains?", "output": "select class from captain group by class having count(*) > 2"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Give the classes that have more than two captains.", "output": "select class from captain group by class having count(*) > 2"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The rank contains values such as Midshipman, Lieutenant. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the name of captains whose rank are either Midshipman or Lieutenant.", "output": "select name from captain where rank = 'Midshipman' or rank = 'Lieutenant'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The rank contains values such as Midshipman, Lieutenant. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the names of captains that have either the rank Midshipman or Lieutenant?", "output": "select name from captain where rank = 'Midshipman' or rank = 'Lieutenant'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the average and minimum age of captains in different class?", "output": "select avg(age), min(age), class from captain group by class"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Return the average and minimum age of captains in each class.", "output": "select avg(age), min(age), class from captain group by class"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The class contains values such as Armed schooner, Cutter. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the captain rank that has some captains in both Cutter and Armed schooner classes.", "output": "select rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The class contains values such as Armed schooner, Cutter. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the ranks of captains that are both in the Cutter and Armed schooner classes?", "output": "select rank from captain where class = 'Cutter' intersect select rank from captain where class = 'Armed schooner'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The class contains values such as Third-rate ship of the line. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the captain rank that has no captain in Third-rate ship of the line class.", "output": "select rank from captain except select rank from captain where class = 'Third-rate ship of the line'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The class contains values such as Third-rate ship of the line. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?", "output": "select rank from captain except select rank from captain where class = 'Third-rate ship of the line'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What is the name of the youngest captain?", "output": "select name from captain order by age limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Return the name of the youngest captain.", "output": "select name from captain order by age limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "how many ships are there?", "output": "select count(*) from ship"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Count the number of ships.", "output": "select count(*) from ship"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the name, type, and flag of the ship that is built in the most recent year.", "output": "select name, type, flag from ship order by built_year desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What is the name, type, and flag of the ship that was built in the most recent year?", "output": "select name, type, flag from ship order by built_year desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Group by ships by flag, and return number of ships that have each flag.", "output": "select count(*), flag from ship group by flag"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the different ship flags, and how many ships have each?", "output": "select count(*), flag from ship group by flag"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Which flag is most widely used among all ships?", "output": "select flag from ship group by flag order by count(*) desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Return the flag that is most common among all ships.", "output": "select flag from ship group by flag order by count(*) desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "List all ship names in the order of built year and class.", "output": "select name from ship order by built_year, class"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the names of ships, ordered by year they were built and their class?", "output": "select name from ship order by built_year, class"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The type contains values such as Panamax.The flag contains values such as Panama, Malta. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the ship type that are used by both ships with Panama and Malta flags.", "output": "select type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The type contains values such as Panamax.The flag contains values such as Panama, Malta. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What types of ships have both ships that have Panama Flags and Malta flags?", "output": "select type from ship where flag = 'Panama' intersect select type from ship where flag = 'Malta'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "In which year were most of ships built?", "output": "select built_year from ship group by built_year order by count(*) desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What is the year in which most ships were built?", "output": "select built_year from ship group by built_year order by count(*) desc limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the name of the ships that have more than one captain.", "output": "select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id group by t2.ship_id having count(*) > 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the names of ships that have more than one captain?", "output": "select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id group by t2.ship_id having count(*) > 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "what are the names and classes of the ships that do not have any captain yet?", "output": "select name, class from ship where ship_id not in (select ship_id from captain)"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Return the names and classes of ships that do not have a captain?", "output": "select name, class from ship where ship_id not in (select ship_id from captain)"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the name of the ship that is steered by the youngest captain.", "output": "select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id order by t2.age limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What is the name of the ship that is commanded by the youngest captain?", "output": "select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id order by t2.age limit 1"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The rank contains values such as Midshipman. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the name and flag of ships that are not steered by any captain with Midshipman rank.", "output": "select name, flag from ship where ship_id not in (select ship_id from captain where rank = 'Midshipman')"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The rank contains values such as Midshipman. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the names and flags of ships that do not have a captain with the rank of Midshipman?", "output": "select name, flag from ship where ship_id not in (select ship_id from captain where rank = 'Midshipman')"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The rank contains values such as Midshipman, Lieutenant. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.", "output": "select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id where t2.rank = 'Midshipman' intersect select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id where t2.rank = 'Lieutenant'"}, {"instruction": "ship_1 contains tables such as captain, ship. Table captain has columns such as captain_id, name, ship_id, age, class, rank. captain_id is the primary key. The rank contains values such as Midshipman, Lieutenant. Table ship has columns such as ship_id, name, type, built_year, class, flag. ship_id is the primary key. The ship_id of captain is the foreign key of ship_id of ship.", "input": "What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?", "output": "select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id where t2.rank = 'Midshipman' intersect select t1.name from ship as t1 join captain as t2 on t1.ship_id = t2.ship_id where t2.rank = 'Lieutenant'"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What is id of the city that hosted events in the most recent year?", "output": "select host_city from hosting_city order by year desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Find the city that hosted some events in the most recent year. What is the id of this city?", "output": "select host_city from hosting_city order by year desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. The competition contains values such as 1994 FIFA World Cup qualification. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Find the match ids of the cities that hosted competition \"1994 FIFA World Cup qualification\"?", "output": "select match_id from match where competition = \"1994 fifa world cup qualification\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. The competition contains values such as 1994 FIFA World Cup qualification. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What is the match id of the competition called \"1994 FIFA World Cup qualification\"?", "output": "select match_id from match where competition = \"1994 fifa world cup qualification\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Find the cities which were once a host city after 2010?", "output": "select t1.city from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city where t2.year > 2010"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities served as a host city after 2010?", "output": "select t1.city from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city where t2.year > 2010"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which city has hosted the most events?", "output": "select t1.city from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city group by t2.host_city order by count(*) desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Find the city that hosted the most events.", "output": "select t1.city from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city group by t2.host_city order by count(*) desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. The city contains values such as Nanjing ( Jiangsu ). Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. The competition contains values such as 1994 FIFA World Cup qualification. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What is the venue of the competition \"1994 FIFA World Cup qualification\" hosted by \"Nanjing ( Jiangsu )\"?", "output": "select t3.venue from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city join match as t3 on t2.match_id = t3.match_id where t1.city = \"Nanjing ( jiangsu )\" and t3.competition = \"1994 fifa world cup qualification\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. The city contains values such as Nanjing ( Jiangsu ). Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. The competition contains values such as 1994 FIFA World Cup qualification. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Find the venue of the competition \"1994 FIFA World Cup qualification\" which was hosted by \"Nanjing ( Jiangsu )\".", "output": "select t3.venue from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city join match as t3 on t2.match_id = t3.match_id where t1.city = \"Nanjing ( jiangsu )\" and t3.competition = \"1994 fifa world cup qualification\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. The city contains values such as Shanghai. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Give me the temperature of Shanghai in January.", "output": "select t2.jan from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t1.city = \"Shanghai\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. The city contains values such as Shanghai. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What is the temperature of \"Shanghai\" city in January?", "output": "select t2.jan from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t1.city = \"Shanghai\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. The city contains values such as Taizhou ( Zhejiang ). Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What is the host year of city \"Taizhou ( Zhejiang )\"?", "output": "select t2.year from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city where t1.city = \"Taizhou ( zhejiang )\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. The city contains values such as Taizhou ( Zhejiang ). Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "IN which year did city \"Taizhou ( Zhejiang )\" serve as a host city?", "output": "select t2.year from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city where t1.city = \"Taizhou ( zhejiang )\""}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which three cities have the largest regional population?", "output": "select city from city order by regional_population desc limit 3"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What are the three largest cities in terms of regional population?", "output": "select city from city order by regional_population desc limit 3"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which city has the lowest GDP? Please list the city name and its GDP.", "output": "select city, gdp from city order by gdp limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What is the city with the smallest GDP? Return the city and its GDP.", "output": "select city, gdp from city order by gdp limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which city has the highest temperature in February?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id order by t2.feb desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "In February, which city marks the highest temperature?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id order by t2.feb desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.jul or t2.mar > t2.oct"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities' temperature in March is lower than that in July or higher than that in Oct?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.jul or t2.mar > t2.oct"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.jul intersect select t3.city from city as t3 join hosting_city as t4 on t3.city_id = t4.host_city"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities have lower temperature in March than in July and have been once host cities?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.jul intersect select t3.city from city as t3 join hosting_city as t4 on t3.city_id = t4.host_city"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.dec except select t3.city from city as t3 join hosting_city as t4 on t3.city_id = t4.host_city"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities have lower temperature in March than in Dec and have never served as host cities?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.mar < t2.dec except select t3.city from city as t3 join hosting_city as t4 on t3.city_id = t4.host_city"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.feb > t2.jun union select t3.city from city as t3 join hosting_city as t4 on t3.city_id = t4.host_city"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities have higher temperature in Feb than in Jun or have once served as host cities?", "output": "select t1.city from city as t1 join temperature as t2 on t1.city_id = t2.city_id where t2.feb > t2.jun union select t3.city from city as t3 join hosting_city as t4 on t3.city_id = t4.host_city"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Please give me a list of cities whose regional population is over 10000000.", "output": "select city from city where regional_population > 10000000"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities have regional population above 10000000?", "output": "select city from city where regional_population > 10000000"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Please give me a list of cities whose regional population is over 8000000 or under 5000000.", "output": "select city from city where regional_population > 10000000 union select city from city where regional_population < 5000000"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities have regional population above 8000000 or below 5000000?", "output": "select city from city where regional_population > 10000000 union select city from city where regional_population < 5000000"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Find the number of matches in different competitions.", "output": "select count(*), competition from match group by competition"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "For each competition, count the number of matches.", "output": "select count(*), competition from match group by competition"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "List venues of all matches in the order of their dates starting from the most recent one.", "output": "select venue from match order by date desc"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What are the venues of all the matches? Sort them in the descending order of match date.", "output": "select venue from match order by date desc"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "what is the GDP of the city with the largest population.", "output": "select gdp from city order by regional_population desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Find the GDP of the city with the largest regional population.", "output": "select gdp from city order by regional_population desc limit 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "What are the GDP and population of the city that already served as a host more than once?", "output": "select t1.gdp, t1.regional_population from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city group by t2.host_city having count(*) > 1"}, {"instruction": "city_record contains tables such as city, match, temperature, hosting_city. Table city has columns such as city_id, city, hanzi, hanyu_pinyin, regional_population, gdp. city_id is the primary key. Table match has columns such as match_id, date, venue, score, result, competition. match_id is the primary key. Table temperature has columns such as city_id, jan, feb, mar, apr, jun, jul, aug, sep, oct, nov, dec. city_id is the primary key. Table hosting_city has columns such as year, match_id, host_city. year is the primary key. The city_id of temperature is the foreign key of city_id of city. The match_id of hosting_city is the foreign key of match_id of match. The host_city of hosting_city is the foreign key of city_id of city.", "input": "Which cities have served as host cities more than once? Return me their GDP and population.", "output": "select t1.gdp, t1.regional_population from city as t1 join hosting_city as t2 on t1.city_id = t2.host_city group by t2.host_city having count(*) > 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "List every individual's first name, middle name and last name in alphabetical order by last name.", "output": "select individual_first_name, individual_middle_name, individual_last_name from individuals order by individual_last_name"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the first, middle, and last names of all individuals, ordered by last name?", "output": "select individual_first_name, individual_middle_name, individual_last_name from individuals order by individual_last_name"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "List all the types of forms.", "output": "select distinct form_type_code from forms"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the different types of forms?", "output": "select distinct form_type_code from forms"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the name of the most popular party form.", "output": "select t1.form_name from forms as t1 join party_forms as t2 on t1.form_id = t2.form_id group by t2.form_id order by count(*) desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What is the name of the party form that is most common?", "output": "select t1.form_name from forms as t1 join party_forms as t2 on t1.form_id = t2.form_id group by t2.form_id order by count(*) desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. The party_email contains values such as enrico09@example.com. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the payment method and phone of the party with email \"enrico09@example.com\".", "output": "select payment_method_code, party_phone from parties where party_email = \"enrico09@example.com\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. The party_email contains values such as enrico09@example.com. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What is the payment method code and party phone of the party with the email 'enrico09@example.com'?", "output": "select payment_method_code, party_phone from parties where party_email = \"enrico09@example.com\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the emails of parties with the most popular party form.", "output": "select t1.party_email from parties as t1 join party_forms as t2 on t1.party_id = t2.party_id where t2.form_id = (select form_id from party_forms group by form_id order by count(*) desc limit 1)"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the party emails associated with parties that used the party form that is the most common?", "output": "select t1.party_email from parties as t1 join party_forms as t2 on t1.party_id = t2.party_id where t2.form_id = (select form_id from party_forms group by form_id order by count(*) desc limit 1)"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "List all the name of organizations in order of the date formed.", "output": "select organization_name from organizations order by date_formed asc"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the names of organizations, ordered by the date they were formed, ascending?", "output": "select organization_name from organizations order by date_formed asc"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the name of the youngest organization.", "output": "select organization_name from organizations order by date_formed desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What is the name of the organization that was formed most recently?", "output": "select organization_name from organizations order by date_formed desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. The organization_name contains values such as Labour Party. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the last name of the latest contact individual of the organization \"Labour Party\".", "output": "select t3.individual_last_name from organizations as t1 join organization_contact_individuals as t2 on t1.organization_id = t2.organization_id join individuals as t3 on t2.individual_id = t3.individual_id where t1.organization_name = \"Labour Party\" order by t2.date_contact_to desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. The organization_name contains values such as Labour Party. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What is the last name of the contact individual from the Labour party organization who was contacted most recently?", "output": "select t3.individual_last_name from organizations as t1 join organization_contact_individuals as t2 on t1.organization_id = t2.organization_id join individuals as t3 on t2.individual_id = t3.individual_id where t1.organization_name = \"Labour Party\" order by t2.date_contact_to desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the last name of the first ever contact person of the organization with the highest UK Vat number.", "output": "select t3.individual_last_name from organizations as t1 join organization_contact_individuals as t2 on t1.organization_id = t2.organization_id join individuals as t3 on t2.individual_id = t3.individual_id where t1.uk_vat_number = (select max(uk_vat_number) from organizations) order by t2.date_contact_to asc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?", "output": "select t3.individual_last_name from organizations as t1 join organization_contact_individuals as t2 on t1.organization_id = t2.organization_id join individuals as t3 on t2.individual_id = t3.individual_id where t1.uk_vat_number = (select max(uk_vat_number) from organizations) order by t2.date_contact_to asc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "How many services are there?", "output": "select count(*) from services"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Count the number of services.", "output": "select count(*) from services"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find name of the services that has never been used.", "output": "select service_name from services except select t1.service_name from services as t1 join party_services as t2 on t1.service_id = t2.service_id"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the names of the services that have never been used?", "output": "select service_name from services except select t1.service_name from services as t1 join party_services as t2 on t1.service_id = t2.service_id"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the name of all the cities and states.", "output": "select town_city from addresses union select state_province_county from addresses"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the names of all cities and states?", "output": "select town_city from addresses union select state_province_county from addresses"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. The state_province_county contains values such as Colorado. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "How many cities are there in state \"Colorado\"?", "output": "select count(*) from addresses where state_province_county = \"Colorado\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. The state_province_county contains values such as Colorado. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Count the number of cities in the state of Colorado.", "output": "select count(*) from addresses where state_province_county = \"Colorado\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the payment method code used by more than 3 parties.", "output": "select payment_method_code from parties group by payment_method_code having count(*) > 3"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the payment method codes that have been used by more than 3 parties?", "output": "select payment_method_code from parties group by payment_method_code having count(*) > 3"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the name of organizations whose names contain \"Party\".", "output": "select organization_name from organizations where organization_name like \"%party%\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the names of organizations that contain the word \"Party\"?", "output": "select organization_name from organizations where organization_name like \"%party%\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "How many distinct payment methods are used by parties?", "output": "select count(distinct payment_method_code) from parties"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Count the number of different payment method codes used by parties.", "output": "select count(distinct payment_method_code) from parties"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Which is the email of the party that has used the services the most number of times?", "output": "select t1.party_email from parties as t1 join party_services as t2 on t1.party_id = t2.customer_id group by t1.party_email order by count(*) desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Return the party email that has used party services the greatest number of times.", "output": "select t1.party_email from parties as t1 join party_services as t2 on t1.party_id = t2.customer_id group by t1.party_email order by count(*) desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Which state can address \"6862 Kaitlyn Knolls\" possibly be in?", "output": "select state_province_county from addresses where line_1_number_building like \"%6862 kaitlyn knolls%\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Give the state corresponding to the line number building \"6862 Kaitlyn Knolls\".", "output": "select state_province_county from addresses where line_1_number_building like \"%6862 kaitlyn knolls%\""}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What is the name of organization that has the greatest number of contact individuals?", "output": "select t1.organization_name from organizations as t1 join organization_contact_individuals as t2 on t1.organization_id = t2.organization_id group by t1.organization_name order by count(*) desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Return the name of the organization which has the most contact individuals.", "output": "select t1.organization_name from organizations as t1 join organization_contact_individuals as t2 on t1.organization_id = t2.organization_id group by t1.organization_name order by count(*) desc limit 1"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "Find the last name of the individuals that have been contact individuals of an organization.", "output": "select distinct t1.individual_last_name from individuals as t1 join organization_contact_individuals as t2 on t1.individual_id = t2.individual_id"}, {"instruction": "e_government contains tables such as addresses, services, forms, individuals, organizations, parties, organization_contact_individuals, party_addresses, party_forms, party_services. Table addresses has columns such as address_id, line_1_number_building, town_city, zip_postcode, state_province_county, country. address_id is the primary key. Table services has columns such as service_id, service_type_code, service_name, service_descriptio. service_id is the primary key. Table forms has columns such as form_id, form_type_code, service_id, form_number, form_name, form_description. form_id is the primary key. Table individuals has columns such as individual_id, individual_first_name, individual_middle_name, inidividual_phone, individual_email, individual_address, individual_last_name. individual_id is the primary key. Table organizations has columns such as organization_id, date_formed, organization_name, uk_vat_number. organization_id is the primary key. Table parties has columns such as party_id, payment_method_code, party_phone, party_email. party_id is the primary key. Table organization_contact_individuals has columns such as individual_id, organization_id, date_contact_from, date_contact_to. individual_id is the primary key. Table party_addresses has columns such as party_id, address_id, date_address_from, address_type_code, date_address_to. party_id is the primary key. Table party_forms has columns such as party_id, form_id, date_completion_started, form_status_code, date_fully_completed. party_id is the primary key. Table party_services has columns such as booking_id, customer_id, service_id, service_datetime, booking_made_date. is the primary key. The service_id of forms is the foreign key of service_id of services. The individual_id of organization_contact_individuals is the foreign key of individual_id of individuals. The organization_id of organization_contact_individuals is the foreign key of organization_id of organizations. The party_id of party_addresses is the foreign key of party_id of parties. The address_id of party_addresses is the foreign key of address_id of addresses. The form_id of party_forms is the foreign key of form_id of forms. The party_id of party_forms is the foreign key of party_id of parties. The customer_id of party_services is the foreign key of party_id of parties. The service_id of party_services is the foreign key of service_id of services.", "input": "What are the last names of individuals who have been contact individuals for an organization?", "output": "select distinct t1.individual_last_name from individuals as t1 join organization_contact_individuals as t2 on t1.individual_id = t2.individual_id"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "How many drivers are there?", "output": "select count(*) from driver"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the name, home city, and age for all drivers.", "output": "select name, home_city, age from driver"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the party and the number of drivers in each party.", "output": "select party, count(*) from driver group by party"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the name of drivers in descending order of age.", "output": "select name from driver order by age desc"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show all different home cities.", "output": "select distinct home_city from driver"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the home city with the most number of drivers.", "output": "select home_city from driver group by home_city order by count(*) desc limit 1"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. The home_city contains values such as Hartford. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the party with drivers from Hartford and drivers older than 40.", "output": "select party from driver where home_city = 'Hartford' and age > 40"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show home city where at least two drivers older than 40 are from.", "output": "select home_city from driver where age > 40 group by home_city having count(*) >= 2"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show all home cities except for those having a driver older than 40.", "output": "select home_city from driver except select home_city from driver where age > 40"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the names of the drivers without a school bus.", "output": "select name from driver where driver_id not in (select driver_id from school_bus)"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the types of schools that have two schools.", "output": "select type from school group by type having count(*) = 2"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the school name and driver name for all school buses.", "output": "select t2.school, t3.name from school_bus as t1 join school as t2 on t1.school_id = t2.school_id join driver as t3 on t1.driver_id = t3.driver_id"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "What is the maximum, minimum and average years spent working on a school bus?", "output": "select max(years_working), min(years_working), avg(years_working) from school_bus"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the school name and type for schools without a school bus.", "output": "select school, type from school where school_id not in (select school_id from school_bus)"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "Show the type of school and the number of buses for each type.", "output": "select t2.type, count(*) from school_bus as t1 join school as t2 on t1.school_id = t2.school_id group by t2.type"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. The home_city contains values such as Hartford. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "How many drivers are from Hartford city or younger than 40?", "output": "select count(*) from driver where home_city = 'Hartford' or age < 40"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. The home_city contains values such as Hartford. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "List names for drivers from Hartford city and younger than 40.", "output": "select name from driver where home_city = 'Hartford' and age < 40"}, {"instruction": "school_bus contains tables such as driver, school, school_bus. Table driver has columns such as driver_id, name, party, home_city, age. driver_id is the primary key. Table school has columns such as school_id, grade, school, location, type. school_id is the primary key. Table school_bus has columns such as school_id, driver_id, years_working, if_full_time. school_id is the primary key. The driver_id of school_bus is the foreign key of driver_id of driver. The school_id of school_bus is the foreign key of school_id of school.", "input": "find the name of driver who is driving the school bus with the longest working history.", "output": "select t1.name from driver as t1 join school_bus as t2 on t1.driver_id = t2.driver_id order by years_working desc limit 1"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "How many flights have a velocity larger than 200?", "output": "select count(*) from flight where velocity > 200"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "List the vehicle flight number, date and pilot of all the flights, ordered by altitude.", "output": "select vehicle_flight_number, date, pilot from flight order by altitude asc"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "List the id, country, city and name of the airports ordered alphabetically by the name.", "output": "select id, country, city, name from airport order by name"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What is maximum group equity shareholding of the companies?", "output": "select max(group_equity_shareholding) from operate_company"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The pilot contains values such as Thompson. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What is the velocity of the pilot named 'Thompson'?", "output": "select avg(velocity) from flight where pilot = 'Thompson'"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What are the names and types of the companies that have ever operated a flight?", "output": "select t1.name, t1.type from operate_company as t1 join flight as t2 on t1.id = t2.company_id"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. The country contains values such as Iceland. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What are the names of the airports which are not in the country 'Iceland'?", "output": "select name from airport where country != 'Iceland'"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What are the distinct types of the companies that have operated any flights with velocity less than 200?", "output": "select distinct t1.type from operate_company as t1 join flight as t2 on t1.id = t2.company_id where t2.velocity < 200"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What are the ids and names of the companies that operated more than one flight?", "output": "select t1.id, t1.name from operate_company as t1 join flight as t2 on t1.id = t2.company_id group by t1.id having count(*) > 1"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What is the id, name and IATA code of the airport that had most number of flights?", "output": "select t1.id, t1.name, t1.iata from airport as t1 join flight as t2 on t1.id = t2.airport_id group by t2.id order by count(*) desc limit 1"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. The city contains values such as Billund.The country contains values such as United States.The name contains values such as Billund Airport. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?", "output": "select distinct t2.pilot from airport as t1 join flight as t2 on t1.id = t2.airport_id where t1.country = 'United States' or t1.name = 'Billund Airport'"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "What is the most common company type, and how many are there?", "output": "select type, count(*) from operate_company group by type order by count(*) desc limit 1"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The pilot contains values such as Thompson. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "How many airports haven't the pilot 'Thompson' driven an aircraft?", "output": "select count(*) from airport where id not in ( select airport_id from flight where pilot = 'Thompson' );"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. The principal_activities contains values such as Catering services, Cargo. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.", "output": "select t2.pilot from operate_company as t1 join flight as t2 on t1.id = t2.company_id where t1.principal_activities = 'Cargo' intersect select t2.pilot from operate_company as t1 join flight as t2 on t1.id = t2.company_id where t1.principal_activities = 'Catering services'"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "Which of the airport names contains the word 'international'?", "output": "select name from airport where name like '%international%'"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. The principal_activities contains values such as Airline. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "How many companies operates airlines in each airport?", "output": "select t3.id, count(*) from operate_company as t1 join flight as t2 on t1.id = t2.company_id join airport as t3 on t2.airport_id = t3.id group by t3.id"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "how many airports are there in each country?", "output": "select count(*), country from airport group by country"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "which countries have more than 2 airports?", "output": "select country from airport group by country having count(*) > 2"}, {"instruction": "flight_company contains tables such as airport, operate_company, flight. Table airport has columns such as id, city, country, iata, icao, name. id is the primary key. Table operate_company has columns such as id, name, type, principal_activities, incorporated_in, group_equity_shareholding. id is the primary key. Table flight has columns such as id, vehicle_flight_number, date, pilot, velocity, altitude, airport_id, company_id. id is the primary key. The company_id of flight is the foreign key of id of operate_company. The airport_id of flight is the foreign key of id of airport.", "input": "which pilot is in charge of the most number of flights?", "output": "select pilot from flight group by pilot order by count(*) desc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many accounts do we have?", "output": "select count(*) from accounts"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Count the number of accounts.", "output": "select count(*) from accounts"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show all account ids and account details.", "output": "select account_id, account_details from accounts"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the ids and details of all accounts?", "output": "select account_id, account_details from accounts"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many statements do we have?", "output": "select count(*) from statements"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Count the number of statements.", "output": "select count(*) from statements"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "List all statement ids and statement details.", "output": "select statement_id, statement_details from statements"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the ids and details of all statements?", "output": "select statement_id, statement_details from statements"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show statement id, statement detail, account detail for accounts.", "output": "select t1.statement_id, t2.statement_details, t1.account_details from accounts as t1 join statements as t2 on t1.statement_id = t2.statement_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the statement ids, statement details, and account details, for all accounts?", "output": "select t1.statement_id, t2.statement_details, t1.account_details from accounts as t1 join statements as t2 on t1.statement_id = t2.statement_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show all statement id and the number of accounts for each statement.", "output": "select statement_id, count(*) from accounts group by statement_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the different statement ids on accounts, and the number of accounts for each?", "output": "select statement_id, count(*) from accounts group by statement_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the statement id and the statement detail for the statement with most number of accounts.", "output": "select t1.statement_id, t2.statement_details from accounts as t1 join statements as t2 on t1.statement_id = t2.statement_id group by t1.statement_id order by count(*) desc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the statement id and statement detail for the statement that has the most corresponding accounts?", "output": "select t1.statement_id, t2.statement_details from accounts as t1 join statements as t2 on t1.statement_id = t2.statement_id group by t1.statement_id order by count(*) desc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the number of documents.", "output": "select count(*) from documents"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Count the number of documents.", "output": "select count(*) from documents"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as Book, CV. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Noel CV, King Book. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "List the document type code, document name, and document description for the document with name 'Noel CV' or name 'King Book'.", "output": "select document_type_code, document_name, document_description from documents where document_name = 'Noel CV' or document_name = 'King Book'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as Book, CV. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV.The document_name contains values such as Noel CV, King Book. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?", "output": "select document_type_code, document_name, document_description from documents where document_name = 'Noel CV' or document_name = 'King Book'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the ids and names of all documents.", "output": "select document_id, document_name from documents"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the ids and names for each of the documents?", "output": "select document_id, document_name from documents"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as BK. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as BK. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Find names and ids of all documents with document type code BK.", "output": "select document_name, document_id from documents where document_type_code = \"BK\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as BK. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as BK. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the names and ids of documents that have the type code BK?", "output": "select document_name, document_id from documents where document_type_code = \"BK\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as BK. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as BK. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many documents are with document type code BK for each product id?", "output": "select count(*), project_id from documents where document_type_code = \"BK\" group by project_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as BK. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as BK. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Count the number of documents with the type code BK that correspond to each product id.", "output": "select count(*), project_id from documents where document_type_code = \"BK\" group by project_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. The project_details contains values such as Graph Database project. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the document name and the document date for all documents on project with details 'Graph Database project'.", "output": "select document_name, document_date from documents as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'Graph database project'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. The project_details contains values such as Graph Database project. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the names and dates for documents corresponding to project that has the details 'Graph Database project'?", "output": "select document_name, document_date from documents as t1 join projects as t2 on t1.project_id = t2.project_id where t2.project_details = 'Graph database project'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show project ids and the number of documents in each project.", "output": "select project_id, count(*) from documents group by project_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many documents correspond with each project id?", "output": "select project_id, count(*) from documents group by project_id"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the id of the project with least number of documents?", "output": "select project_id from documents group by project_id order by count(*) asc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the id of the project that has the fewest corresponding documents.", "output": "select project_id from documents group by project_id order by count(*) asc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the ids for projects with at least 2 documents.", "output": "select project_id from documents group by project_id having count(*) >= 2"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are project ids of projects that have 2 or more corresponding documents?", "output": "select project_id from documents group by project_id having count(*) >= 2"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "List document type codes and the number of documents in each code.", "output": "select document_type_code, count(*) from documents group by document_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many documents are there of each type?", "output": "select document_type_code, count(*) from documents group by document_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the document type code with most number of documents?", "output": "select document_type_code from documents group by document_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the code of the document type that is most common.", "output": "select document_type_code from documents group by document_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the document type code with fewer than 3 documents.", "output": "select document_type_code from documents group by document_type_code having count(*) < 3"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the codes corresponding to document types for which there are less than 3 documents?", "output": "select document_type_code from documents group by document_type_code having count(*) < 3"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. The statement_details contains values such as Private Project. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.", "output": "select t1.statement_details, t2.document_name from statements as t1 join documents as t2 on t1.statement_id = t2.document_id where t1.statement_details = 'Private Project'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. The statement_details contains values such as Private Project. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the details for statements with the details 'Private Project', and what are the names of the corresponding documents?", "output": "select t1.statement_details, t2.document_name from statements as t1 join documents as t2 on t1.statement_id = t2.document_id where t1.statement_details = 'Private Project'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show all document type codes, document type names, document type descriptions.", "output": "select document_type_code, document_type_name, document_type_description from ref_document_types"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the codes, names, and descriptions of the different document types?", "output": "select document_type_code, document_type_name, document_type_description from ref_document_types"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Film. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the document type description for document type named Film?", "output": "select document_type_description from ref_document_types where document_type_name = \"Film\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Film. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the description of the document type name 'Film'.", "output": "select document_type_description from ref_document_types where document_type_name = \"Film\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the document type name and the document type description and creation date for all the documents?", "output": "select t1.document_type_name, t1.document_type_description, t2.document_date from ref_document_types as t1 join documents as t2 on t1.document_type_code = t2.document_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the type name, type description, and date of creation for each document.", "output": "select t1.document_type_name, t1.document_type_description, t2.document_date from ref_document_types as t1 join documents as t2 on t1.document_type_code = t2.document_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the number of projects.", "output": "select count(*) from projects"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many projects are there?", "output": "select count(*) from projects"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "List ids and details for all projects.", "output": "select project_id, project_details from projects"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the ids and details for each project?", "output": "select project_id, project_details from projects"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the project id and detail for the project with at least two documents?", "output": "select t1.project_id, t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id group by t1.project_id having count(*) > 2"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the ids and details corresponding to projects for which there are more than two documents.", "output": "select t1.project_id, t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id group by t1.project_id having count(*) > 2"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Book. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_name contains values such as King Book. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the project detail for the project with document \"King Book\"?", "output": "select t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id where t2.document_name = \"King Book\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_name contains values such as Book. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_name contains values such as King Book. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Give the details of the project with the document name 'King Book'.", "output": "select t1.project_details from projects as t1 join documents as t2 on t1.project_id = t2.project_id where t2.document_name = \"King Book\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many budget types do we have?", "output": "select count(*) from ref_budget_codes"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Count the number of budget codes.", "output": "select count(*) from ref_budget_codes"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "List all budget type codes and descriptions.", "output": "select budget_type_code, budget_type_description from ref_budget_codes"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the type codes and descriptions of each budget type?", "output": "select budget_type_code, budget_type_description from ref_budget_codes"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_code contains values such as ORG. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The budget_type_code contains values such as ORG. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the description for the budget type with code ORG?", "output": "select budget_type_description from ref_budget_codes where budget_type_code = \"ORG\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_code contains values such as ORG. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The budget_type_code contains values such as ORG. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the description of the budget type that has the code ORG.", "output": "select budget_type_description from ref_budget_codes where budget_type_code = \"ORG\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many documents have expenses?", "output": "select count(*) from documents_with_expenses"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Count the number of documents with expenses.", "output": "select count(*) from documents_with_expenses"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_code contains values such as SF. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The budget_type_code contains values such as SF. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the document ids for the budget type code 'SF'?", "output": "select document_id from documents_with_expenses where budget_type_code = 'SF'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_code contains values such as SF. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The budget_type_code contains values such as SF. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Give the ids of documents with expenses that have the budget code 'SF'.", "output": "select document_id from documents_with_expenses where budget_type_code = 'SF'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show the budget type code and description and the corresponding document id.", "output": "select t2.budget_type_code, t2.budget_type_description, t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the budget type codes, budget type descriptions and document ids for documents with expenses.", "output": "select t2.budget_type_code, t2.budget_type_description, t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_description contains values such as Government. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The document_details contains values such as government. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show ids for all documents with budget types described as 'Government'.", "output": "select t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code where t2.budget_type_description = \"Government\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_description contains values such as Government. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The document_details contains values such as government. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Give the ids for documents that have the budget description 'Government'.", "output": "select t1.document_id from documents_with_expenses as t1 join ref_budget_codes as t2 on t1.budget_type_code = t2.budget_type_code where t2.budget_type_description = \"Government\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show budget type codes and the number of documents in each budget type.", "output": "select budget_type_code, count(*) from documents_with_expenses group by budget_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the different budget type codes, and how many documents are there for each?", "output": "select budget_type_code, count(*) from documents_with_expenses group by budget_type_code"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What is the budget type code with most number of documents.", "output": "select budget_type_code from documents_with_expenses group by budget_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Give the budget type code that is most common among documents with expenses.", "output": "select budget_type_code from documents_with_expenses group by budget_type_code order by count(*) desc limit 1"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the ids of documents which don't have expense budgets?", "output": "select document_id from documents except select document_id from documents_with_expenses"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the ids of documents that do not have expenses.", "output": "select document_id from documents except select document_id from documents_with_expenses"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Show ids for all documents in type CV without expense budgets.", "output": "select document_id from documents where document_type_code = \"CV\" except select document_id from documents_with_expenses"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. The document_type_code contains values such as CV.The document_type_name contains values such as CV. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. The document_type_code contains values such as CV. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the ids of documents with the type code CV that do not have expenses.", "output": "select document_id from documents where document_type_code = \"CV\" except select document_id from documents_with_expenses"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the ids of documents with letter 's' in the name with any expense budgets.", "output": "select t1.document_id from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%s%'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Give the ids of documents that have expenses and contain the letter s in their names.", "output": "select t1.document_id from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t1.document_name like '%s%'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "How many documents do not have any expense?", "output": "select count(*) from documents where document_id not in ( select document_id from documents_with_expenses )"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Count the number of documents that do not have expenses.", "output": "select count(*) from documents where document_id not in ( select document_id from documents_with_expenses )"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_code contains values such as GV, SF. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The budget_type_code contains values such as GV, SF. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the dates for the documents with both 'GV' type and 'SF' type expenses?", "output": "select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'GV' intersect select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'SF'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. The budget_type_code contains values such as GV, SF. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. The budget_type_code contains values such as GV, SF. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Give the dates of creation for documents that have both budget type codes 'GV' and 'SF'.", "output": "select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'GV' intersect select t1.document_date from documents as t1 join documents_with_expenses as t2 on t1.document_id = t2.document_id where t2.budget_type_code = 'SF'"}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "What are the account details with the largest value or with value having char '5' in it?", "output": "select max(account_details) from accounts union select account_details from accounts where account_details like \"%5%\""}, {"instruction": "cre_Docs_and_Epenses contains tables such as ref_document_types, ref_budget_codes, projects, documents, statements, documents_with_expenses, accounts. Table ref_document_types has columns such as document_type_code, document_type_name, document_type_description. document_type_code is the primary key. Table ref_budget_codes has columns such as budget_type_code, budget_type_description. budget_type_code is the primary key. Table projects has columns such as project_id, project_details. project_id is the primary key. Table documents has columns such as document_id, document_type_code, project_id, document_date, document_name, document_description, other_details. document_id is the primary key. Table statements has columns such as statement_id, statement_details. statement_id is the primary key. Table documents_with_expenses has columns such as document_id, budget_type_code, document_details. document_id is the primary key. Table accounts has columns such as account_id, statement_id, account_details. account_id is the primary key. The project_id of documents is the foreign key of project_id of projects. The document_type_code of documents is the foreign key of document_type_code of ref_document_types. The statement_id of statements is the foreign key of document_id of documents. The document_id of documents_with_expenses is the foreign key of document_id of documents. The budget_type_code of documents_with_expenses is the foreign key of budget_type_code of ref_budget_codes. The statement_id of accounts is the foreign key of statement_id of statements.", "input": "Return the account details with the greatest value, as well as those that include the character 5.", "output": "select max(account_details) from accounts union select account_details from accounts where account_details like \"%5%\""}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the total number of scientists.", "output": "select count(*) from scientists"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "How many scientists are there?", "output": "select count(*) from scientists"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the total hours of all projects.", "output": "select sum(hours) from projects"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What is the total number of hours for all projects?", "output": "select sum(hours) from projects"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "How many different scientists are assigned to any project?", "output": "select count(distinct scientist) from assignedto"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Count the number of different scientists assigned to any project.", "output": "select count(distinct scientist) from assignedto"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the number of distinct projects.", "output": "select count(distinct name) from projects"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "How many different projects are there?", "output": "select count(distinct name) from projects"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the average hours of all projects.", "output": "select avg(hours) from projects"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What is the average hours across all projects?", "output": "select avg(hours) from projects"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the name of project that continues for the longest time.", "output": "select name from projects order by hours desc limit 1"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What is the name of the project with the most hours?", "output": "select name from projects order by hours desc limit 1"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "List the name of all projects that are operated longer than the average working hours of all projects.", "output": "select name from projects where hours > (select avg(hours) from projects)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of projects that have taken longer than the average number of hours for all projects?", "output": "select name from projects where hours > (select avg(hours) from projects)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the name and hours of project that has the most number of scientists.", "output": "select t1.name, t1.hours from projects as t1 join assignedto as t2 on t1.code = t2.project group by t2.project order by count(*) desc limit 1"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What is the name and hours for the project which has the most scientists assigned to it?", "output": "select t1.name, t1.hours from projects as t1 join assignedto as t2 on t1.code = t2.project group by t2.project order by count(*) desc limit 1"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the name of the project for which a scientist whose name contains \u2018Smith\u2019 is assigned to.", "output": "select t2.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name like '%smith%'"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?", "output": "select t2.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name like '%smith%'"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. The name contains values such as Michael Rogers, Carol Smith. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.", "output": "select sum(t2.hours) from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name = 'Michael Rogers' or t3.name = 'Carol Smith'"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. The name contains values such as Michael Rogers, Carol Smith. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?", "output": "select sum(t2.hours) from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t3.name = 'Michael Rogers' or t3.name = 'Carol Smith'"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the name of projects that require between 100 and 300 hours of work.", "output": "select name from projects where hours between 100 and 300"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of projects that require between 100 and 300 hours?", "output": "select name from projects where hours between 100 and 300"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. The name contains values such as A Puzzling Parallax. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.", "output": "select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.name = 'Matter of Time' intersect select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.name = 'A puzzling Parallax'"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of any scientists who worked on projects named 'Matter of Time' and 'A Puzzling Pattern'?", "output": "select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.name = 'Matter of Time' intersect select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.name = 'A puzzling Parallax'"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "List the names of all scientists sorted in alphabetical order.", "output": "select name from scientists order by name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of all the scientists in alphabetical order?", "output": "select name from scientists order by name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the number of scientists involved for each project name.", "output": "select count(*), t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project group by t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the naems of all the projects, and how many scientists were assigned to each of them?", "output": "select count(*), t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project group by t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the number of scientists involved for the projects that require more than 300 hours.", "output": "select count(*), t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project where t1.hours > 300 group by t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of projects that require more than 300 hours, and how many scientists are assigned to each?", "output": "select count(*), t1.name from projects as t1 join assignedto as t2 on t1.code = t2.project where t1.hours > 300 group by t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the number of projects which each scientist is working on and scientist's name.", "output": "select count(*), t1.name from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist group by t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of the scientists, and how many projects are each of them working on?", "output": "select count(*), t1.name from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist group by t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the SSN and name of scientists who are assigned to the project with the longest hours.", "output": "select t3.ssn, t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.hours = (select max(hours) from projects)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the SSN and names of scientists working on the project with the most hours?", "output": "select t3.ssn, t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.hours = (select max(hours) from projects)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the name of scientists who are assigned to some project.", "output": "select t2.name from assignedto as t1 join scientists as t2 on t1.scientist = t2.ssn"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of scientists who are assigned to any project?", "output": "select t2.name from assignedto as t1 join scientists as t2 on t1.scientist = t2.ssn"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Select the project names which are not assigned yet.", "output": "select name from projects where code not in (select project from assignedto)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of projects that have not been assigned?", "output": "select name from projects where code not in (select project from assignedto)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the name of scientists who are not assigned to any project.", "output": "select name from scientists where ssn not in (select scientist from assignedto)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of scientists who have not been assigned a project?", "output": "select name from scientists where ssn not in (select scientist from assignedto)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the number of scientists who are not assigned to any project.", "output": "select count(*) from scientists where ssn not in (select scientist from assignedto)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "How many scientists do not have any projects assigned to them?", "output": "select count(*) from scientists where ssn not in (select scientist from assignedto)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find the names of scientists who are not working on the project with the highest hours.", "output": "select name from scientists except select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.hours = (select max(hours) from projects)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of scientists who are not working on the project with the most hours?", "output": "select name from scientists except select t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.hours = (select max(hours) from projects)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.", "output": "select t1.name, t3.name, t3.hours from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist join projects as t3 on t2.project = t3.code order by t3.name, t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name.", "output": "select t1.name, t3.name, t3.hours from scientists as t1 join assignedto as t2 on t1.ssn = t2.scientist join projects as t3 on t2.project = t3.code order by t3.name, t1.name"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "Find name of the project that needs the least amount of time to finish and the name of scientists who worked on it.", "output": "select t2.name, t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.hours = (select min(hours) from projects)"}, {"instruction": "scientist_1 contains tables such as scientists, projects, assignedto. Table scientists has columns such as ssn, name. ssn is the primary key. Table projects has columns such as code, name, hours. code is the primary key. Table assignedto has columns such as scientist, project. scientist is the primary key. The project of assignedto is the foreign key of code of projects. The scientist of assignedto is the foreign key of ssn of scientists.", "input": "What is the name of the project that requires the fewest number of hours, and the names of the scientists assigned to it?", "output": "select t2.name, t3.name from assignedto as t1 join projects as t2 on t1.project = t2.code join scientists as t3 on t1.scientist = t3.ssn where t2.hours = (select min(hours) from projects)"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the name of the highest rated wine?", "output": "select name from wine order by score limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the name of the wine with the highest score.", "output": "select name from wine order by score limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Which winery is the wine that has the highest score from?", "output": "select winery from wine order by score limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the winery at which the wine with the highest score was made?", "output": "select winery from wine order by score limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the names of all wines produced in 2008.", "output": "select name from wine where year = \"2008\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of all wines produced in 2008?", "output": "select name from wine where year = \"2008\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the grapes and appelations of all wines.", "output": "select grape, appelation from wine"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the grapes and appelations of each wine?", "output": "select grape, appelation from wine"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the names and scores of all wines.", "output": "select name, score from wine"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names and scores of all wines?", "output": "select name, score from wine"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the area and county of all appelations.", "output": "select area, county from appellations"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the areas and counties for all appelations?", "output": "select area, county from appellations"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the prices of wines produced before the year of 2010?", "output": "select price from wine where year < 2010"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Return the prices of wines produced before 2010.", "output": "select price from wine where year < 2010"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the names of all distinct wines that have scores higher than 90.", "output": "select name from wine where score > 90"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines with scores higher than 90?", "output": "select name from wine where score > 90"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as Red. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the names of all distinct wines that are made of red color grape.", "output": "select distinct t2.name from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"Red\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as Red. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines made from red grapes?", "output": "select distinct t2.name from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"Red\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as North Coast.The area contains values such as North Coast. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as North Coast. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the names of all distinct wines that have appellations in North Coast area.", "output": "select distinct t2.name from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.area = \"North Coast\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as North Coast.The area contains values such as North Coast. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as North Coast. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the distinct names of wines that have appellations in the North Coast area?", "output": "select distinct t2.name from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.area = \"North Coast\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The winery contains values such as Robert Biale. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "How many wines are produced at Robert Biale winery?", "output": "select count(*) from wine where winery = \"Robert Biale\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The winery contains values such as Robert Biale.The name contains values such as Numbers. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Count the number of wines produced at Robert Biale winery.", "output": "select count(*) from wine where winery = \"Robert Biale\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The county contains values such as Napa. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "How many appelations are in Napa Country?", "output": "select count(*) from appellations where county = \"Napa\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The county contains values such as Napa. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The name contains values such as Numbers. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Count the number of appelations in Napa County.", "output": "select count(*) from appellations where county = \"Napa\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Sonoma County.The county contains values such as Sonoma. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Sonoma County. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give me the average prices of wines that are produced by appelations in Sonoma County.", "output": "select avg(t2.price) from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.county = \"Sonoma\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Sonoma County.The county contains values such as Sonoma. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Sonoma County. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the average price of wines produced in appelations in Sonoma County?", "output": "select avg(t2.price) from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.county = \"Sonoma\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as White. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names and scores of wines that are made of white color grapes?", "output": "select t2.name, t2.score from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"White\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as White. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the names and scores of wines made from white grapes.", "output": "select t2.name, t2.score from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"White\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Central Coast.The area contains values such as Central Coast. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Central Coast. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the maximum price of wins from the appelations in Central Coast area and produced before the year of 2005.", "output": "select max(t2.price) from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.area = \"Central Coast\" and t2.year < 2005"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Central Coast.The area contains values such as Central Coast. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Central Coast. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the maximum price of wines from the appelation in the Central Coast area, which was produced before 2005?", "output": "select max(t2.price) from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.area = \"Central Coast\" and t2.year < 2005"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as White. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the the grape whose white color grapes are used to produce wines with scores higher than 90.", "output": "select distinct t1.grape from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"White\" and t2.score > 90"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as White. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the white grape used to produce wines with scores above 90.", "output": "select distinct t1.grape from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"White\" and t2.score > 90"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as Red. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the wines that have prices higher than 50 and made of Red color grapes?", "output": "select t2.name from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"Red\" and t2.price > 50"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as Red. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines made from red grapes and with prices above 50?", "output": "select t2.name from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"Red\" and t2.price > 50"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Monterey County.The county contains values such as Monterey. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Monterey County. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the wines that have prices lower than 50 and have appelations in Monterey county?", "output": "select t2.name from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.county = \"Monterey\" and t2.price < 50"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Monterey County.The county contains values such as Monterey. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Monterey County. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the neames of wines with prices below 50 and with appelations in Monterey county.", "output": "select t2.name from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.county = \"Monterey\" and t2.price < 50"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The name contains values such as Numbers. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the numbers of wines for different grapes?", "output": "select count(*), grape from wine group by grape"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "How many wines are there for each grape?", "output": "select count(*), grape from wine group by grape"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the average prices of wines for different years?", "output": "select avg(price), year from wine group by year"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the average prices of wines for each each?", "output": "select avg(price), year from wine group by year"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The winery contains values such as John Anthony. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the distinct names of all wines that have prices higher than some wines from John Anthony winery.", "output": "select distinct name from wine where price > (select min(price) from wine where winery = \"John Anthony\")"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The winery contains values such as John Anthony. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the distinct names of wines with prices higher than any wine from John Anthony winery.", "output": "select distinct name from wine where price > (select min(price) from wine where winery = \"John Anthony\")"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the names of all distinct wines in alphabetical order.", "output": "select distinct name from wine order by name"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines, sorted in alphabetical order?", "output": "select distinct name from wine order by name"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the names of all distinct wines ordered by price.", "output": "select distinct name from wine order by price"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines, sorted by price ascending?", "output": "select distinct name from wine order by price"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The name contains values such as Numbers. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the area of the appelation that produces the highest number of wines before the year of 2010?", "output": "select t1.area from appellations as t1 join wine as t2 on t1.appelation = t2.appelation group by t2.appelation having t2.year < 2010 order by count(*) desc limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the area for the appelation which produced the most wines prior to 2010?", "output": "select t1.area from appellations as t1 join wine as t2 on t1.appelation = t2.appelation group by t2.appelation having t2.year < 2010 order by count(*) desc limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the color of the grape whose wine products has the highest average price?", "output": "select t1.color from grapes as t1 join wine as t2 on t1.grape = t2.grape group by t2.grape order by avg(price) desc limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the color of the grape whose wine products have the highest average price?", "output": "select t1.color from grapes as t1 join wine as t2 on t1.grape = t2.grape group by t2.grape order by avg(price) desc limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the distinct names of wines produced before the year of 2000 or after the year of 2010.", "output": "select distinct name from wine where year < 2000 or year > 2010"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the distinct names of wines made before 2000 or after 2010.", "output": "select distinct name from wine where year < 2000 or year > 2010"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the distinct winery of wines having price between 50 and 100.", "output": "select distinct winery from wine where price between 50 and 100"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the distinct wineries which produce wines costing between 50 and 100?", "output": "select distinct winery from wine where price between 50 and 100"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The grape contains values such as Zinfandel. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The grape contains values such as Zinfandel.The name contains values such as Zinfandel. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?", "output": "select avg(price), avg(cases) from wine where year = 2009 and grape = \"Zinfandel\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The grape contains values such as Zinfandel. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The grape contains values such as Zinfandel.The name contains values such as Zinfandel. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the average price and case of wines made from Zinfandel grapes in the year 2009.", "output": "select avg(price), avg(cases) from wine where year = 2009 and grape = \"Zinfandel\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as St. Helena. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as St. Helena. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the maximum price and score of wines produced by St. Helena appelation?", "output": "select max(price), max(score) from wine where appelation = \"St. Helena\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as St. Helena. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as St. Helena. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the maximum price and score for wines produced in the appelation St. Helena.", "output": "select max(price), max(score) from wine where appelation = \"St. Helena\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the maximum price and score of wines in each year?", "output": "select max(price), max(score), year from wine group by year"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the maximum price and score of wines for each year?", "output": "select max(price), max(score), year from wine group by year"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the average price and score of wines grouped by appelation?", "output": "select avg(price), avg(score), appelation from wine group by appelation"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the average price and score of wines for each appelation?", "output": "select avg(price), avg(score), appelation from wine group by appelation"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the wineries that have at least four wines.", "output": "select winery from wine group by winery having count(*) >= 4"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Which wineries produce at least four wines?", "output": "select winery from wine group by winery having count(*) >= 4"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the country of all appelations who have at most three wines.", "output": "select t1.county from appellations as t1 join wine as t2 on t1.appelation = t2.appelation group by t2.appelation having count(*) <= 3"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the countries for appelations with at most 3 wines?", "output": "select t1.county from appellations as t1 join wine as t2 on t1.appelation = t2.appelation group by t2.appelation having count(*) <= 3"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The winery contains values such as Brander. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines whose production year are before the year of all wines by Brander winery?", "output": "select name from wine where year < (select min(year) from wine where winery = \"Brander\")"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The winery contains values such as Brander. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines produced before any wine from the Brander winery?", "output": "select name from wine where year < (select min(year) from wine where winery = \"Brander\")"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the names of wines that are more expensive then all wines made in the year 2006?", "output": "select name from wine where price > (select max(price) from wine where year = 2006)"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Give the names of wines with prices above any wine produced in 2006.", "output": "select name from wine where price > (select max(price) from wine where year = 2006)"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as White. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The name contains values such as Numbers. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the top 3 wineries with the greatest number of wines made of white color grapes.", "output": "select t2.winery from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"White\" group by t2.winery order by count(*) desc limit 3"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. The color contains values such as White. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Which 3 wineries produce the most wines made from white grapes?", "output": "select t2.winery from grapes as t1 join wine as t2 on t1.grape = t2.grape where t1.color = \"White\" group by t2.winery order by count(*) desc limit 3"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the grape, winery and year of the wines whose price is bigger than 100 ordered by year.", "output": "select grape, winery, year from wine where price > 100 order by year"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the grapes, wineries and years for wines with price higher than 100, sorted by year?", "output": "select grape, winery, year from wine where price > 100 order by year"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "List the grape, appelation and name of wines whose score is higher than 93 ordered by Name.", "output": "select grape, appelation, name from wine where score > 93 order by name"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the grapes, appelations, and wines with scores above 93, sorted by Name?", "output": "select grape, appelation, name from wine where score > 93 order by name"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Central Coast.The area contains values such as Central Coast. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Central Coast. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the appelations that produce wines after the year of 2008 but not in Central Coast area.", "output": "select appelation from wine where year > 2008 except select appelation from appellations where area = \"Central Coast\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Central Coast.The area contains values such as Central Coast. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Central Coast. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What are the appelations for wines produced after 2008 but not in the Central Coast area?", "output": "select appelation from wine where year > 2008 except select appelation from appellations where area = \"Central Coast\""}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Sonoma County.The county contains values such as Sonoma. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Sonoma County. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the average price of wines that are not produced from Sonoma county.", "output": "select avg(price) from wine where appelation not in (select t1.appelation from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.county = 'Sonoma')"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. The appelation contains values such as Sonoma County.The county contains values such as Sonoma. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation contains values such as Sonoma County. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the average price for wines not produced in Sonoma county?", "output": "select avg(price) from wine where appelation not in (select t1.appelation from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t1.county = 'Sonoma')"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The name contains values such as Numbers. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "Find the county where produces the most number of wines with score higher than 90.", "output": "select t1.county from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t2.score > 90 group by t1.county order by count(*) desc limit 1"}, {"instruction": "wine_1 contains tables such as grapes, appellations, wine. Table grapes has columns such as id, grape, color. id is the primary key. Table appellations has columns such as no, appelation, county, state, area, isava. no is the primary key. Table wine has columns such as no, grape, winery, appelation, state, name, year, price, score, cases, drink. is the primary key. The appelation of wine is the foreign key of appelation of appellations. The grape of wine is the foreign key of grape of grapes.", "input": "What is the county that produces the most wines scoring higher than 90?", "output": "select t1.county from appellations as t1 join wine as t2 on t1.appelation = t2.appelation where t2.score > 90 group by t1.county order by count(*) desc limit 1"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "How many train stations are there?", "output": "select count(*) from station"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the name, location, and number of platforms for all stations.", "output": "select name, location, number_of_platforms from station"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "What are all locations of train stations?", "output": "select distinct location from station"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. The location contains values such as London. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the names and total passengers for all train stations not in London.", "output": "select name, total_passengers from station where location != 'London'"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the names and main services for train stations that have the top three total number of passengers.", "output": "select name, main_services from station order by total_passengers desc limit 3"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. The location contains values such as Glasgow, London. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "What is the average and maximum number of total passengers for train stations in London or Glasgow?", "output": "select avg(total_passengers), max(total_passengers) from station where location = 'London' or location = 'Glasgow'"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show all locations and the total number of platforms and passengers for all train stations in each location.", "output": "select location, sum(number_of_platforms), sum(total_passengers) from station group by location"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.", "output": "select distinct location from station where number_of_platforms >= 15 and total_passengers > 25"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show all locations which don't have a train station with at least 15 platforms.", "output": "select location from station except select location from station where number_of_platforms >= 15"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the location with most number of train stations.", "output": "select location from station group by location order by count(*) desc limit 1"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the name, time, and service for all trains.", "output": "select name, time, service from train"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the number of trains", "output": "select count(*) from train"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the name and service for all trains in order by time.", "output": "select name, service from train order by time"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the station name and number of trains in each station.", "output": "select t2.name, count(*) from train_station as t1 join station as t2 on t1.station_id = t2.station_id group by t1.station_id"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "show the train name and station name for each train.", "output": "select t2.name, t3.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. The location contains values such as London. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show all train names and times in stations in London in descending order by train time.", "output": "select t3.name, t3.time from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t2.location = 'London' order by t3.time desc"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the station name with greatest number of trains.", "output": "select t2.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id group by t1.station_id order by count(*) desc limit 1"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show the station name with at least two trains.", "output": "select t2.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id group by t1.station_id having count(*) >= 2"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show all locations with only 1 station.", "output": "select location from station group by location having count(*) = 1"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Show station names without any trains.", "output": "select name from station where station_id not in (select station_id from train_station)"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. The name contains values such as Ananthapuri Express, Guruvayur Express. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "What are the names of the stations which serve both \"Ananthapuri Express\" and \"Guruvayur Express\" trains?", "output": "select t2.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t3.name = \"Ananthapuri Express\" intersect select t2.name from train_station as t1 join station as t2 on t1.station_id = t2.station_id join train as t3 on t3.train_id = t1.train_id where t3.name = \"Guruvayur Express\""}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. The location contains values such as London. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "Find the names of the trains that do not pass any station located in London.", "output": "select t2.name from train_station as t1 join train as t2 on t1.train_id = t2.train_id where t1.station_id not in (select t4.station_id from train_station as t3 join station as t4 on t3.station_id = t4.station_id where t4.location = \"London\")"}, {"instruction": "train_station contains tables such as station, train, train_station. Table station has columns such as station_id, name, annual_entry_exit, annual_interchanges, total_passengers, location, main_services, number_of_platforms. station_id is the primary key. Table train has columns such as train_id, name, time, service. train_id is the primary key. Table train_station has columns such as train_id, station_id. train_id is the primary key. The station_id of train_station is the foreign key of station_id of station. The train_id of train_station is the foreign key of train_id of train.", "input": "List the names and locations of all stations ordered by their yearly entry exit and interchange amounts.", "output": "select name, location from station order by annual_entry_exit, annual_interchanges"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List all vehicle id", "output": "select vehicle_id from vehicles;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the ids of all vehicles?", "output": "select vehicle_id from vehicles;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many vehicle in total?", "output": "select count(*) from vehicles;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many vehicles exist?", "output": "select count(*) from vehicles;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Show the detail of vehicle with id 1.", "output": "select vehicle_details from vehicles where vehicle_id = 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. The vehicle_details contains values such as Car. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the details of the car with id 1?", "output": "select vehicle_details from vehicles where vehicle_id = 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List the first name middle name and last name of all staff.", "output": "select first_name, middle_name, last_name from staff;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the first, middle, and last names of all staff?", "output": "select first_name, middle_name, last_name from staff;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the birthday of the staff member with first name as Janessa and last name as Sawayn?", "output": "select date_of_birth from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the date of birth for the staff member named Janessa Sawayn?", "output": "select date_of_birth from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "When did the staff member with first name as Janessa and last name as Sawayn join the company?", "output": "select date_joined_staff from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "When did the staff member named Janessa Sawayn join the company?", "output": "select date_joined_staff from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "When did the staff member with first name as Janessa and last name as Sawayn leave the company?", "output": "select date_left_staff from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "When did the staff member Janessa Sawayn leave the company?", "output": "select date_left_staff from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Ludie. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many staff have the first name Ludie?", "output": "select count(*) from staff where first_name = \"Ludie\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Ludie. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many employees have a first name of Ludie?", "output": "select count(*) from staff where first_name = \"Ludie\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the nickname of staff with first name as Janessa and last name as Sawayn?", "output": "select nickname from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the nickname of the employee named Janessa Sawayn?", "output": "select nickname from staff where first_name = \"Janessa\" and last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many staff in total?", "output": "select count(*) from staff;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many employees are there?", "output": "select count(*) from staff;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Which city does staff with first name as Janessa and last name as Sawayn live?", "output": "select t1.city from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "In what city does Janessa Sawayn live?", "output": "select t1.city from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Which country and state does staff with first name as Janessa and last name as Sawayn lived?", "output": "select t1.country, t1.state_province_county from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "In which country and state does Janessa Sawayn live?", "output": "select t1.country, t1.state_province_county from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Rylan.The last_name contains values such as Goodwin. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?", "output": "select sum(t1.lesson_time) from lessons as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Rylan\" and t2.last_name = \"Goodwin\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Rylan.The last_name contains values such as Goodwin. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How long is the total lesson time took by the customer named Rylan Goodwin?", "output": "select sum(t1.lesson_time) from lessons as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Rylan\" and t2.last_name = \"Goodwin\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the zip code of staff with first name as Janessa and last name as Sawayn lived?", "output": "select t1.zip_postcode from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the zip code of the hosue of the employee named Janessa Sawayn?", "output": "select t1.zip_postcode from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. The state_province_county contains values such as Georgia. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many staff live in state Georgia?", "output": "select count(*) from addresses where state_province_county = \"Georgia\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. The state_province_county contains values such as Georgia. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many employees live in Georgia?", "output": "select count(*) from addresses where state_province_county = \"Georgia\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. The city contains values such as Damianfort. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Find out the first name and last name of staff lived in city Damianfort.", "output": "select t2.first_name, t2.last_name from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t1.city = \"Damianfort\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. The city contains values such as Damianfort. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the first and last name of all employees who live in the city Damianfort?", "output": "select t2.first_name, t2.last_name from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id where t1.city = \"Damianfort\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Which city lives most of staffs? List the city name and number of staffs.", "output": "select t1.city, count(*) from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id group by t1.city order by count(*) desc limit 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "In which city do the most employees live and how many of them live there?", "output": "select t1.city, count(*) from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id group by t1.city order by count(*) desc limit 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List the states which have between 2 to 4 staffs living there.", "output": "select t1.state_province_county from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id group by t1.state_province_county having count(*) between 2 and 4;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the names of the states that have 2 to 4 employees living there?", "output": "select t1.state_province_county from addresses as t1 join staff as t2 on t1.address_id = t2.staff_address_id group by t1.state_province_county having count(*) between 2 and 4;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List the first name and last name of all customers.", "output": "select first_name, last_name from customers;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the first and last names for all customers?", "output": "select first_name, last_name from customers;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List email address and birthday of customer whose first name as Carole.", "output": "select email_address, date_of_birth from customers where first_name = \"Carole\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the email addresses and date of births for all customers who have a first name of Carole?", "output": "select email_address, date_of_birth from customers where first_name = \"Carole\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List phone number and email address of customer with more than 2000 outstanding balance.", "output": "select phone_number, email_address from customers where amount_outstanding > 2000;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?", "output": "select phone_number, email_address from customers where amount_outstanding > 2000;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Marina.The last_name contains values such as Kohler. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the status code, mobile phone number and email address of customer with last name as Kohler or first name as Marina?", "output": "select customer_status_code, cell_mobile_phone_number, email_address from customers where first_name = \"Marina\" or last_name = \"Kohler\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Marina.The last_name contains values such as Kohler. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the status code, phone number, and email address of the customer whose last name is Kohler or whose first name is Marina?", "output": "select customer_status_code, cell_mobile_phone_number, email_address from customers where first_name = \"Marina\" or last_name = \"Kohler\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The customer_status_code contains values such as Good Customer. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "When are the birthdays of customer who are classified as 'Good Customer' status?", "output": "select date_of_birth from customers where customer_status_code = 'Good Customer'"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The customer_status_code contains values such as Good Customer. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the date of birth of every customer whose status code is 'Good Customer'?", "output": "select date_of_birth from customers where customer_status_code = 'Good Customer'"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "When did customer with first name as Carole and last name as Bernhard became a customer?", "output": "select date_became_customer from customers where first_name = \"Carole\" and last_name = \"Bernhard\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "When did Carole Bernhard first become a customer?", "output": "select date_became_customer from customers where first_name = \"Carole\" and last_name = \"Bernhard\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many customers in total?", "output": "select count(*) from customers;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many customers are there?", "output": "select count(*) from customers;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List all customer status codes and the number of customers having each status code.", "output": "select customer_status_code, count(*) from customers group by customer_status_code;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "For each customer status code, how many customers are classified that way?", "output": "select customer_status_code, count(*) from customers group by customer_status_code;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Which customer status code has least number of customers?", "output": "select customer_status_code from customers group by customer_status_code order by count(*) asc limit 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the status code with the least number of customers?", "output": "select customer_status_code from customers group by customer_status_code order by count(*) asc limit 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Rylan.The last_name contains values such as Goodwin. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The lesson_status_code contains values such as Completed. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lessons taken by customer with first name as Rylan and last name as Goodwin were completed?", "output": "select count(*) from lessons as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Rylan\" and t2.last_name = \"Goodwin\" and t1.lesson_status_code = \"Completed\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The last_name contains values such as Goodwin. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The lesson_status_code contains values such as Completed. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lessons did the customer Ryan Goodwin complete?", "output": "select count(*) from lessons as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Rylan\" and t2.last_name = \"Goodwin\" and t1.lesson_status_code = \"Completed\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is maximum, minimum and average amount of outstanding of customer?", "output": "select max(amount_outstanding), min(amount_outstanding), avg(amount_outstanding) from customers;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the maximum, minimum, and average amount of money outsanding for all customers?", "output": "select max(amount_outstanding), min(amount_outstanding), avg(amount_outstanding) from customers;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List the first name and last name of customers have the amount of outstanding between 1000 and 3000.", "output": "select first_name, last_name from customers where amount_outstanding between 1000 and 3000;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?", "output": "select first_name, last_name from customers where amount_outstanding between 1000 and 3000;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. The city contains values such as Lockmanfurt. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List first name and last name of customers lived in city Lockmanfurt.", "output": "select t1.first_name, t1.last_name from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id where t2.city = \"Lockmanfurt\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. The city contains values such as Lockmanfurt. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the first and last names of all customers who lived in Lockmanfurt?", "output": "select t1.first_name, t1.last_name from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id where t2.city = \"Lockmanfurt\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Which country does customer with first name as Carole and last name as Bernhard lived in?", "output": "select t2.country from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id where t1.first_name = \"Carole\" and t1.last_name = \"Bernhard\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the country in which the customer Carole Bernhard lived?", "output": "select t2.country from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id where t1.first_name = \"Carole\" and t1.last_name = \"Bernhard\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is zip code of customer with first name as Carole and last name as Bernhard?", "output": "select t2.zip_postcode from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id where t1.first_name = \"Carole\" and t1.last_name = \"Bernhard\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the zip code of the customer Carole Bernhard?", "output": "select t2.zip_postcode from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id where t1.first_name = \"Carole\" and t1.last_name = \"Bernhard\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Which city does has most number of customers?", "output": "select t2.city from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id group by t2.city order by count(*) desc limit 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the city with the most customers?", "output": "select t2.city from customers as t1 join addresses as t2 on t1.customer_address_id = t2.address_id group by t2.city order by count(*) desc limit 1;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How much in total does customer with first name as Carole and last name as Bernhard paid?", "output": "select sum(t1.amount_payment) from customer_payments as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Carole\" and t2.last_name = \"Bernhard\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Carole.The last_name contains values such as Bernhard. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the total amount of moeny paid by the customer Carole Bernhard?", "output": "select sum(t1.amount_payment) from customer_payments as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Carole\" and t2.last_name = \"Bernhard\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List the number of customers that did not have any payment history.", "output": "select count(*) from customers where customer_id not in ( select customer_id from customer_payments );"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many customers have no payment histories?", "output": "select count(*) from customers where customer_id not in ( select customer_id from customer_payments );"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List first name and last name of customers that have more than 2 payments.", "output": "select t2.first_name, t2.last_name from customer_payments as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) > 2;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the first and last names of all customers with more than 2 payments?", "output": "select t2.first_name, t2.last_name from customer_payments as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t1.customer_id having count(*) > 2;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List all payment methods and number of payments using each payment methods.", "output": "select payment_method_code, count(*) from customer_payments group by payment_method_code;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "For each payment method, how many payments were made?", "output": "select payment_method_code, count(*) from customer_payments group by payment_method_code;"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The lesson_status_code contains values such as Cancelled. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lessons were in cancelled state?", "output": "select count(*) from lessons where lesson_status_code = \"Cancelled\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The lesson_status_code contains values such as Cancelled. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lessons have been cancelled?", "output": "select count(*) from lessons where lesson_status_code = \"Cancelled\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "List lesson id of all lessons taught by staff with first name as Janessa, last name as Sawayn and nickname containing letter 's'.", "output": "select t1.lesson_id from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\" and nickname like \"%s%\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the the lesson ids of all staff taught by Janessa Sawayn whose nickname has the letter s?", "output": "select t1.lesson_id from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\" and nickname like \"%s%\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lessons taught by staff whose first name has letter 'a' in it?", "output": "select count(*) from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name like \"%a%\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lessons were taught by a staff member whose first name has the letter 'a' in it?", "output": "select count(*) from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name like \"%a%\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?", "output": "select sum(lesson_time) from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the total time for all lessons taught by Janessa Sawayn?", "output": "select sum(lesson_time) from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is average lesson price taught by staff with first name as Janessa and last name as Sawayn?", "output": "select avg(price) from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. The first_name contains values such as Janessa.The last_name contains values such as Sawayn. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the average price for a lesson taught by Janessa Sawayn?", "output": "select avg(price) from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id where t2.first_name = \"Janessa\" and t2.last_name = \"Sawayn\";"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Ray. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lesson does customer with first name Ray took?", "output": "select count(*) from lessons as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Ray\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. The first_name contains values such as Ray. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "How many lessons did the customer with the first name Ray take?", "output": "select count(*) from lessons as t1 join customers as t2 on t1.customer_id = t2.customer_id where t2.first_name = \"Ray\""}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "Which last names are both used by customers and by staff?", "output": "select last_name from customers intersect select last_name from staff"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What are the last names that are used by customers and staff?", "output": "select last_name from customers intersect select last_name from staff"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the first name of the staff who did not give any lesson?", "output": "select first_name from staff except select t2.first_name from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the first name of all employees who do not give any lessons?", "output": "select first_name from staff except select t2.first_name from lessons as t1 join staff as t2 on t1.staff_id = t2.staff_id"}, {"instruction": "driving_school contains tables such as addresses, staff, vehicles, customers, customer_payments, lessons. Table addresses has columns such as address_id, line_1_number_building, city, zip_postcode, state_province_county, country. address_id is the primary key. Table staff has columns such as staff_id, staff_address_id, nickname, first_name, middle_name, last_name, date_of_birth, date_joined_staff, date_left_staff. staff_id is the primary key. Table vehicles has columns such as vehicle_id, vehicle_details. vehicle_id is the primary key. Table customers has columns such as customer_id, customer_address_id, customer_status_code, date_became_customer, date_of_birth, first_name, last_name, amount_outstanding, email_address, phone_number, cell_mobile_phone_number. customer_id is the primary key. Table customer_payments has columns such as customer_id, datetime_payment, payment_method_code, amount_payment. customer_id is the primary key. Table lessons has columns such as lesson_id, customer_id, lesson_status_code, staff_id, vehicle_id, lesson_date, lesson_time, price. lesson_id is the primary key. The staff_address_id of staff is the foreign key of address_id of addresses. The customer_address_id of customers is the foreign key of address_id of addresses. The customer_id of customer_payments is the foreign key of customer_id of customers. The customer_id of lessons is the foreign key of customer_id of customers. The staff_id of lessons is the foreign key of staff_id of staff. The vehicle_id of lessons is the foreign key of vehicle_id of vehicles.", "input": "What is the id and detail of the vehicle used in lessons for most of the times?", "output": "select t1.vehicle_id, t1.vehicle_details from vehicles as t1 join lessons as t2 on t1.vehicle_id = t2.vehicle_id group by t1.vehicle_id order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many faculty do we have?", "output": "select count(*) from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What is the total number of faculty members?", "output": "select count(*) from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What ranks do we have for faculty?", "output": "select distinct rank from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the list of distinct ranks for faculty.", "output": "select distinct rank from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show all the distinct buildings that have faculty rooms.", "output": "select distinct building from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What buildings have faculty offices?", "output": "select distinct building from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the rank, first name, and last name for all the faculty.", "output": "select rank, fname, lname from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the rank, first name, and last name of the faculty members?", "output": "select rank, fname, lname from faculty"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the first name, last name, and phone number for all female faculty members.", "output": "select fname, lname, phone from faculty where sex = 'F'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the first name, last name, and phone number of all the female faculty members?", "output": "select fname, lname, phone from faculty where sex = 'F'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show ids for all the male faculty.", "output": "select facid from faculty where sex = 'M'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the faculty ids of all the male faculty members?", "output": "select facid from faculty where sex = 'M'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many female Professors do we have?", "output": "select count(*) from faculty where sex = 'F' and rank = \"Professor\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Count the number of female Professors we have.", "output": "select count(*) from faculty where sex = 'F' and rank = \"Professor\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Prince.The fname contains values such as Jerry. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the phone, room, and building for the faculty named Jerry Prince.", "output": "select phone, room, building from faculty where fname = \"Jerry\" and lname = \"Prince\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Prince.The fname contains values such as Jerry. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the phone, room, and building of the faculty member called Jerry Prince?", "output": "select phone, room, building from faculty where fname = \"Jerry\" and lname = \"Prince\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor.The building contains values such as NEB. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many Professors are in building NEB?", "output": "select count(*) from faculty where rank = \"Professor\" and building = \"NEB\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor.The building contains values such as NEB. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Count the number of Professors who have office in building NEB.", "output": "select count(*) from faculty where rank = \"Professor\" and building = \"NEB\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the first name and last name for all the instructors.", "output": "select fname, lname from faculty where rank = \"Instructor\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Instructor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the first name and last name of all the instructors?", "output": "select fname, lname from faculty where rank = \"Instructor\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show all the buildings along with the number of faculty members the buildings have.", "output": "select building, count(*) from faculty group by building"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many faculty members does each building have? List the result with the name of the building.", "output": "select building, count(*) from faculty group by building"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which building has most faculty members?", "output": "select building from faculty group by building order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the building that has the largest number of faculty members.", "output": "select building from faculty group by building order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show all the buildings that have at least 10 professors.", "output": "select building from faculty where rank = \"Professor\" group by building having count(*) >= 10"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "In which buildings are there at least ten professors?", "output": "select building from faculty where rank = \"Professor\" group by building having count(*) >= 10"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "For each faculty rank, show the number of faculty members who have it.", "output": "select rank, count(*) from faculty group by rank"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many faculty members do we have for each faculty rank?", "output": "select rank, count(*) from faculty group by rank"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show all the ranks and the number of male and female faculty for each rank.", "output": "select rank, sex, count(*) from faculty group by rank, sex"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many faculty members do we have for each rank and gender?", "output": "select rank, sex, count(*) from faculty group by rank, sex"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which rank has the smallest number of faculty members?", "output": "select rank from faculty group by rank order by count(*) asc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the faculty rank that has the least members.", "output": "select rank from faculty group by rank order by count(*) asc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the number of male and female assistant professors.", "output": "select sex, count(*) from faculty where rank = \"AsstProf\" group by sex"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many male and female assistant professors do we have?", "output": "select sex, count(*) from faculty where rank = \"AsstProf\" group by sex"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Smith. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the first name and last name of Linda Smith's advisor?", "output": "select t1.fname, t1.lname from faculty as t1 join student as t2 on t1.facid = t2.advisor where t2.fname = \"Linda\" and t2.lname = \"Smith\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The lname contains values such as Smith.The fname contains values such as Linda. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Smith. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Who is the advisor of Linda Smith? Give me the first name and last name.", "output": "select t1.fname, t1.lname from faculty as t1 join student as t2 on t1.facid = t2.advisor where t2.fname = \"Linda\" and t2.lname = \"Smith\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the ids of students whose advisors are professors.", "output": "select t2.stuid from faculty as t1 join student as t2 on t1.facid = t2.advisor where t1.rank = \"Professor\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which students have professors as their advisors? Find their student ids.", "output": "select t2.stuid from faculty as t1 join student as t2 on t1.facid = t2.advisor where t1.rank = \"Professor\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Michael. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Goodrich.The fname contains values such as Michael. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show first name and last name for all the students advised by Michael Goodrich.", "output": "select t2.fname, t2.lname from faculty as t1 join student as t2 on t1.facid = t2.advisor where t1.fname = \"Michael\" and t1.lname = \"Goodrich\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Michael. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Goodrich.The fname contains values such as Michael. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which students are advised by Michael Goodrich? Give me their first and last names.", "output": "select t2.fname, t2.lname from faculty as t1 join student as t2 on t1.facid = t2.advisor where t1.fname = \"Michael\" and t1.lname = \"Goodrich\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the faculty id of each faculty member, along with the number of students he or she advises.", "output": "select t1.facid, count(*) from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.facid"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the faculty id and the number of students each faculty has?", "output": "select t1.facid, count(*) from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.facid"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show all the faculty ranks and the number of students advised by each rank.", "output": "select t1.rank, count(*) from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.rank"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many students are advised by each rank of faculty? List the rank and the number of students.", "output": "select t1.rank, count(*) from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.rank"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the first and last name of the faculty who has the most students?", "output": "select t1.fname, t1.lname from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.facid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Give me the the first and last name of the faculty who advises the most students.", "output": "select t1.fname, t1.lname from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.facid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the ids for all the faculty members who have at least 2 students.", "output": "select t1.facid from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.facid having count(*) >= 2"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which faculty members advise two ore more students? Give me their faculty ids.", "output": "select t1.facid from faculty as t1 join student as t2 on t1.facid = t2.advisor group by t1.facid having count(*) >= 2"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show ids for the faculty members who don't advise any student.", "output": "select facid from faculty except select advisor from student"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the ids of the faculty members who do not advise any student.", "output": "select facid from faculty except select advisor from student"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What activities do we have?", "output": "select activity_name from activity"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "List all the activities we have.", "output": "select activity_name from activity"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many activities do we have?", "output": "select count(*) from activity"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the number of activities available.", "output": "select count(*) from activity"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many faculty members participate in an activity?", "output": "select count(distinct facid) from faculty_participates_in"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Give me the number of faculty members who participate in an activity", "output": "select count(distinct facid) from faculty_participates_in"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the ids of the faculty who don't participate in any activity.", "output": "select facid from faculty except select facid from faculty_participates_in"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which faculty do not participate in any activity? Find their faculty ids.", "output": "select facid from faculty except select facid from faculty_participates_in"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the ids of all the faculty members who participate in an activity and advise a student.", "output": "select facid from faculty_participates_in intersect select advisor from student"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are ids of the faculty members who not only participate in an activity but also advise a student.", "output": "select facid from faculty_participates_in intersect select advisor from student"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Mark. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Giuliano.The fname contains values such as Mark. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many activities does Mark Giuliano participate in?", "output": "select count(*) from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid where t1.fname = \"Mark\" and t1.lname = \"Giuliano\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Mark. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Giuliano.The fname contains values such as Mark. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the number of activities Mark Giuliano is involved in.", "output": "select count(*) from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid where t1.fname = \"Mark\" and t1.lname = \"Giuliano\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Mark. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Giuliano.The fname contains values such as Mark. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the names of all the activities Mark Giuliano participates in.", "output": "select t3.activity_name from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t3.actid = t2.actid where t1.fname = \"Mark\" and t1.lname = \"Giuliano\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. The fname contains values such as Mark. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The lname contains values such as Giuliano.The fname contains values such as Mark. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the names of the activities Mark Giuliano is involved in", "output": "select t3.activity_name from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t3.actid = t2.actid where t1.fname = \"Mark\" and t1.lname = \"Giuliano\""}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.", "output": "select t1.fname, t1.lname, count(*), t1.facid from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid group by t1.facid"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.", "output": "select t1.fname, t1.lname, count(*), t1.facid from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid group by t1.facid"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show all the activity names and the number of faculty involved in each activity.", "output": "select t1.activity_name, count(*) from activity as t1 join faculty_participates_in as t2 on t1.actid = t2.actid group by t1.actid"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "How many faculty members participate in each activity? Return the activity names and the number of faculty members.", "output": "select t1.activity_name, count(*) from activity as t1 join faculty_participates_in as t2 on t1.actid = t2.actid group by t1.actid"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What is the first and last name of the faculty participating in the most activities?", "output": "select t1.fname, t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid group by t1.facid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the first and last name of the faculty who is involved in the largest number of activities.", "output": "select t1.fname, t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid group by t1.facid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What is the name of the activity that has the most faculty members involved in?", "output": "select t1.activity_name from activity as t1 join faculty_participates_in as t2 on t1.actid = t2.actid group by t1.actid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which activity has the most faculty members participating in? Find the activity name.", "output": "select t1.activity_name from activity as t1 join faculty_participates_in as t2 on t1.actid = t2.actid group by t1.actid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the ids of the students who don't participate in any activity.", "output": "select stuid from student except select stuid from participates_in"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the ids of the students who are not involved in any activity", "output": "select stuid from student except select stuid from participates_in"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Show the ids for all the students who participate in an activity and are under 20.", "output": "select stuid from participates_in intersect select stuid from student where age < 20"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the ids of the students who are under 20 years old and are involved in at least one activity.", "output": "select stuid from participates_in intersect select stuid from student where age < 20"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What is the first and last name of the student participating in the most activities?", "output": "select t1.fname, t1.lname from student as t1 join participates_in as t2 on t1.stuid = t2.stuid group by t1.stuid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Tell me the first and last name of the student who has the most activities.", "output": "select t1.fname, t1.lname from student as t1 join participates_in as t2 on t1.stuid = t2.stuid group by t1.stuid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What is the name of the activity with the most students?", "output": "select t1.activity_name from activity as t1 join participates_in as t2 on t1.actid = t2.actid group by t1.actid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the name of the activity that has the largest number of student participants.", "output": "select t1.activity_name from activity as t1 join participates_in as t2 on t1.actid = t2.actid group by t1.actid order by count(*) desc limit 1"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the first names of the faculty members who are playing Canoeing or Kayaking.", "output": "select distinct t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Canoeing' or t3.activity_name = 'Kayaking'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.", "output": "select distinct t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Canoeing' or t3.activity_name = 'Kayaking'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the first names of professors who are not playing Canoeing or Kayaking.", "output": "select lname from faculty where rank = 'Professor' except select distinct t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Canoeing' or t3.activity_name = 'Kayaking'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The rank contains values such as Professor. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the first names of the professors who do not play Canoeing or Kayaking as activities?", "output": "select lname from faculty where rank = 'Professor' except select distinct t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Canoeing' or t3.activity_name = 'Kayaking'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the first names of the faculty members who participate in Canoeing and Kayaking.", "output": "select t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Canoeing' intersect select t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Kayaking'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "What are the first names of the faculty members playing both Canoeing and Kayaking?", "output": "select t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Canoeing' intersect select t1.lname from faculty as t1 join faculty_participates_in as t2 on t1.facid = t2.facid join activity as t3 on t2.actid = t2.actid where t3.activity_name = 'Kayaking'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Find the ids of the students who participate in Canoeing and Kayaking.", "output": "select t1.stuid from participates_in as t1 join activity as t2 on t2.actid = t2.actid where t2.activity_name = 'Canoeing' intersect select t1.stuid from participates_in as t1 join activity as t2 on t2.actid = t2.actid where t2.activity_name = 'Kayaking'"}, {"instruction": "activity_1 contains tables such as activity, participates_in, faculty_participates_in, student, faculty. Table activity has columns such as actid, activity_name. actid is the primary key. The activity_name contains values such as Canoeing, Kayaking. Table participates_in has columns such as stuid, actid. is the primary key. Table faculty_participates_in has columns such as facid, actid. is the primary key. Table student has columns such as stuid, lname, fname, age, sex, major, advisor, city_code. stuid is the primary key. Table faculty has columns such as facid, lname, fname, rank, sex, phone, room, building. facid is the primary key. The actid of participates_in is the foreign key of actid of activity. The stuid of participates_in is the foreign key of stuid of student. The actid of faculty_participates_in is the foreign key of actid of activity. The facid of faculty_participates_in is the foreign key of facid of faculty.", "input": "Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.", "output": "select t1.stuid from participates_in as t1 join activity as t2 on t2.actid = t2.actid where t2.activity_name = 'Canoeing' intersect select t1.stuid from participates_in as t1 join activity as t2 on t2.actid = t2.actid where t2.activity_name = 'Kayaking'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Goroka. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name of the airport in the city of Goroka.", "output": "select name from airports where city = 'Goroka'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Goroka, Namest. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the names of the airports in the city of Goroka?", "output": "select name from airports where city = 'Goroka'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as New York, York.The iata contains values such as NEW. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as NEW YORK, CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name, city, country, and altitude (or elevation) of the airports in the city of New York.", "output": "select name, city, country, elevation from airports where city = 'New York'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as New York, York.The iata contains values such as NEW. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as NEW YORK, CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name, city, country, and elevation for every airport in the city of New York?", "output": "select name, city, country, elevation from airports where city = 'New York'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many airlines are there?", "output": "select count(*) from airlines"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as TOTAL. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the total number of airlines?", "output": "select count(*) from airlines"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Russia. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as Russia. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many airlines does Russia has?", "output": "select count(*) from airlines where country = 'Russia'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Russia. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as Russia. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the number of airlines based in Russia?", "output": "select count(*) from airlines where country = 'Russia'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Iceland. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as Iceland. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the maximum elevation of all airports in the country of Iceland?", "output": "select max(elevation) from airports where country = 'Iceland'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Iceland. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as Iceland. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the highest elevation of an airport in the country of Iceland?", "output": "select max(elevation) from airports where country = 'Iceland'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Argentina, Cuba. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as ARGENTINA.The country contains values such as Argentina, Cuba. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name of the airports located in Cuba or Argentina.", "output": "select name from airports where country = 'Cuba' or country = 'Argentina'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Namest.The country contains values such as Argentina, Cuba. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as ARGENTINA.The country contains values such as Argentina, Cuba. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the names of all airports in Cuba or Argentina?", "output": "select name from airports where country = 'Cuba' or country = 'Argentina'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as Orbit. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the country of the airlines whose name starts with 'Orbit'.", "output": "select country from airlines where name like 'Orbit%'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Namest. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as Orbit. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the countries of all airlines whose names start with Orbit?", "output": "select country from airlines where name like 'Orbit%'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name of airports whose altitude is between -50 and 50.", "output": "select name from airports where elevation between -50 and 50"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Namest. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the names of all airports whose elevation is between -50 and 50?", "output": "select name from airports where elevation between -50 and 50"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Which country is the airport that has the highest altitude located in?", "output": "select country from airports order by elevation desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the country of the airport with the highest elevation?", "output": "select country from airports order by elevation desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of airports whose name contain the word 'International'.", "output": "select count(*) from airports where name like '%international%'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Namest. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many airports' names have the word Interanation in them?", "output": "select count(*) from airports where name like '%international%'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Greenland. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as GREENLAND. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many different cities do have some airport in the country of Greenland?", "output": "select count(distinct city) from airports where country = 'Greenland'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Greenland. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as GREENLAND. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "In how many cities are there airports in the country of Greenland?", "output": "select count(distinct city) from airports where country = 'Greenland'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Americana. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The name contains values such as American Airlines.The callsign contains values such as AMERICAN. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of routes operated by American Airlines.", "output": "select count(*) from airlines as t1 join routes as t2 on t1.alid = t2.alid where t1.name = 'American Airlines'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Americana. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The name contains values such as American Airlines.The callsign contains values such as AMERICAN. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many routes does American Airlines operate?", "output": "select count(*) from airlines as t1 join routes as t2 on t1.alid = t2.alid where t1.name = 'American Airlines'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Canada. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as Canadian.The country contains values such as Canada. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of routes whose destination airports are in Canada.", "output": "select count(*) from airports as t1 join routes as t2 on t1.apid = t2.dst_apid where country = 'Canada'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Ende, Enid.The iata contains values such as END. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as END.The callsign contains values such as Canadian, CANADIAN. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many routes end in a Canadian airport?", "output": "select count(*) from airports as t1 join routes as t2 on t1.apid = t2.dst_apid where country = 'Canada'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name, city, and country of the airport that has the lowest altitude.", "output": "select name, city, country from airports order by elevation limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name, city, and country of the airport with the lowest altitude?", "output": "select name, city, country from airports order by elevation limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name, city, and country of the airport that has the highest latitude.", "output": "select name, city, country from airports order by elevation desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name, city, and country of the airport with the highest elevation?", "output": "select name, city, country from airports order by elevation desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name and city of the airport which is the destination of the most number of routes.", "output": "select t1.name, t1.city, t2.dst_apid from airports as t1 join routes as t2 on t1.apid = t2.dst_apid group by t2.dst_apid order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Ende, Enid.The iata contains values such as END. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as END.The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name and city of the airport that the most routes end at?", "output": "select t1.name, t1.city, t2.dst_apid from airports as t1 join routes as t2 on t1.apid = t2.dst_apid group by t2.dst_apid order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Namest.The iata contains values such as TOP. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as TOP. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the names of the top 10 airlines that operate the most number of routes.", "output": "select t1.name, t2.alid from airlines as t1 join routes as t2 on t1.alid = t2.alid group by t2.alid order by count(*) desc limit 10"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Namest.The iata contains values such as TOP. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as TOP, IDS. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "For the airline ids with the top 10 most routes operated, what are their names?", "output": "select t1.name, t2.alid from airlines as t1 join routes as t2 on t1.alid = t2.alid group by t2.alid order by count(*) desc limit 10"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Soure. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name and city of the airport which is the source for the most number of flight routes.", "output": "select t1.name, t1.city, t2.src_apid from airports as t1 join routes as t2 on t1.apid = t2.src_apid group by t2.src_apid order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as CITY. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name and city of the airport from most of the routes start?", "output": "select t1.name, t1.city, t2.src_apid from airports as t1 join routes as t2 on t1.apid = t2.src_apid group by t2.src_apid order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Americana. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The name contains values such as American Airlines.The callsign contains values such as AMERICAN. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of different airports which are the destinations of the American Airlines.", "output": "select count(distinct dst_apid) from airlines as t1 join routes as t2 on t1.alid = t2.alid where t1.name = 'American Airlines'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Americana. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The name contains values such as American Airlines.The callsign contains values such as AMERICAN. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the number of different different airports that are destinations for American Airlines?", "output": "select count(distinct dst_apid) from airlines as t1 join routes as t2 on t1.alid = t2.alid where t1.name = 'American Airlines'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Which countries has the most number of airlines?", "output": "select country from airlines group by country order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Homer. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name of the country with the most number of home airlines?", "output": "select country from airlines group by country order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Which countries has the most number of airlines whose active status is 'Y'?", "output": "select country from airlines where active = 'Y' group by country order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the countries with the most airlines whose active status is Y?", "output": "select country from airlines where active = 'Y' group by country order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "List all countries and their number of airlines in the descending order of number of airlines.", "output": "select country, count(*) from airlines group by country order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many airlines operate out of each country in descending order?", "output": "select country, count(*) from airlines group by country order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. The dst_ap contains values such as PER.The src_ap contains values such as PER. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Peru.The country contains values such as Peru.The iata contains values such as PER. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as PER.The country contains values such as Peru. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many airports are there per country? Order the countries by decreasing number of airports.", "output": "select count(*), country from airports group by country order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. The dst_ap contains values such as PER.The src_ap contains values such as PER. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Peru.The country contains values such as Peru.The iata contains values such as PER. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as PER.The country contains values such as Peru. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the number of airports per country, ordered from most to least?", "output": "select count(*), country from airports group by country order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. The dst_ap contains values such as PER.The src_ap contains values such as PER. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Peru.The country contains values such as United States, Peru.The iata contains values such as PER. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as PER.The callsign contains values such as STATES, UNITED.The country contains values such as United States, Peru. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many airports are there per city in the United States? Order the cities by decreasing number of airports.", "output": "select count(*), city from airports where country = 'United States' group by city order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. The dst_ap contains values such as PER.The src_ap contains values such as PER. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Peru.The country contains values such as Peru.The iata contains values such as PER. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The iata contains values such as US.The icao contains values such as PER.The callsign contains values such as CITY.The country contains values such as Peru. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many airports are there per city in the US ordered from most to least?", "output": "select count(*), city from airports where country = 'United States' group by city order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as United States. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as STATES, UNITED.The country contains values such as United States. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Return the cities with more than 3 airports in the United States.", "output": "select city from airports where country = 'United States' group by city having count(*) > 3"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as United States. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as STATES, UNITED.The country contains values such as United States. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the number of cities in the United States with more than 3 airports?", "output": "select city from airports where country = 'United States' group by city having count(*) > 3"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many cities are there that have more than 3 airports?", "output": "select count(*) from (select city from airports group by city having count(*) > 3)"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the count of cities with more than 3 airports?", "output": "select count(*) from (select city from airports group by city having count(*) > 3)"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as ONE. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "List the cities which have more than one airport and number of airports.", "output": "select city, count(*) from airports group by city having count(*) > 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Namest. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as ONE. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the names of all cities with more than one airport and how many airports do they have?", "output": "select city, count(*) from airports group by city having count(*) > 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "List the cities which have more than 2 airports sorted by the number of airports.", "output": "select city from airports group by city having count(*) > 2 order by count(*)"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the cities that have more than 2 airports sorted by number of airports?", "output": "select city from airports group by city having count(*) > 2 order by count(*)"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Soure. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of routes for each source airport and the airport name.", "output": "select count(*), t1.name from airports as t1 join routes as t2 on t1.apid = t2.src_apid group by t1.name"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "For each airport name, how many routes start at that airport?", "output": "select count(*), t1.name from airports as t1 join routes as t2 on t1.apid = t2.src_apid group by t1.name"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Soure. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of routes and airport name for each source airport, order the results by decreasing number of routes.", "output": "select count(*), t1.name from airports as t1 join routes as t2 on t1.apid = t2.src_apid group by t1.name order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "For each airport name, how many routes start at that airport, ordered from most to least?", "output": "select count(*), t1.name from airports as t1 join routes as t2 on t1.apid = t2.src_apid group by t1.name order by count(*) desc"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the average elevation of all airports for each country.", "output": "select avg(elevation), country from airports group by country"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "For each country, what is the average elevation of that country's airports?", "output": "select avg(elevation), country from airports group by country"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as TWO. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the cities which have exactly two airports.", "output": "select city from airports group by city having count(*) = 2"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as TWO. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What are the cities with exactly two airports?", "output": "select city from airports group by city having count(*) = 2"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "For each country and airline name, how many routes are there?", "output": "select t1.country, t1.name, count(*) from airlines as t1 join routes as t2 on t1.alid = t2.alid group by t1.country, t1.name"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as TOTAL. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the total number of routes for each country and airline in that country?", "output": "select t1.country, t1.name, count(*) from airlines as t1 join routes as t2 on t1.alid = t2.alid group by t1.country, t1.name"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as Italy. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as Italy. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of routes with destination airports in Italy.", "output": "select count(*) from routes as t1 join airports as t2 on t1.dst_apid = t2.apid where t2.country = 'Italy'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the number of routes whose destinations are Italian airports?", "output": "select count(*) from routes as t1 join airports as t2 on t1.dst_apid = t2.apid where t2.country = 'Italy'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Americana.The country contains values such as Italy. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The name contains values such as American Airlines.The callsign contains values such as AMERICAN.The country contains values such as Italy. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Return the number of routes with destination airport in Italy operated by the airline with name 'American Airlines'.", "output": "select count(*) from routes as t1 join airports as t2 on t1.dst_apid = t2.apid join airlines as t3 on t1.alid = t3.alid where t2.country = 'Italy' and t3.name = 'American Airlines'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Americana.The country contains values such as Italy. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The name contains values such as American Airlines.The callsign contains values such as AMERICAN.The country contains values such as Italy. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the number of routes operated by the airline American Airlines whose destinations are in Italy?", "output": "select count(*) from routes as t1 join airports as t2 on t1.dst_apid = t2.apid join airlines as t3 on t1.alid = t3.alid where t2.country = 'Italy' and t3.name = 'American Airlines'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The name contains values such as John F Kennedy International Airport. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of routes that have destination John F Kennedy International Airport.", "output": "select count(*) from airports as t1 join routes as t2 on t1.apid = t2.dst_apid where t1.name = 'John f kennedy international Airport'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The name contains values such as John F Kennedy International Airport.The city contains values such as Ende, Enid.The iata contains values such as END. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The icao contains values such as END. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the number of routes that end at John F Kennedy International Airport?", "output": "select count(*) from airports as t1 join routes as t2 on t1.apid = t2.dst_apid where t1.name = 'John f kennedy international Airport'"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as United States, Canada. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as STATES, UNITED.The country contains values such as United States, Canada. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the number of routes from the United States to Canada.", "output": "select count(*) from routes where dst_apid in (select apid from airports where country = 'Canada') and src_apid in (select apid from airports where country = 'United States')"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. The dst_ap contains values such as GO.The src_ap contains values such as GO. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as United States, Canada. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The iata contains values such as GO.The callsign contains values such as STATES, UNITED.The country contains values such as United States, Canada. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "How many routes go from the United States to Canada?", "output": "select count(*) from routes where dst_apid in (select apid from airports where country = 'Canada') and src_apid in (select apid from airports where country = 'United States')"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Soure.The country contains values such as United States. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as STATES, UNITED.The country contains values such as United States. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the id of routes whose source and destination airports are in the United States.", "output": "select rid from routes where dst_apid in (select apid from airports where country = 'United States') and src_apid in (select apid from airports where country = 'United States')"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Soure.The country contains values such as United States. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The callsign contains values such as STATES, UNITED.The country contains values such as United States. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the id of the routes whose source and destination airports are in the United States?", "output": "select rid from routes where dst_apid in (select apid from airports where country = 'United States') and src_apid in (select apid from airports where country = 'United States')"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the name of airline which runs the most number of routes.", "output": "select t1.name from airlines as t1 join routes as t2 on t1.alid = t2.alid group by t1.name order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name of the airline with the most routes?", "output": "select t1.name from airlines as t1 join routes as t2 on t1.alid = t2.alid group by t1.name order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The city contains values such as Soure.The country contains values such as China. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as China. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the busiest source airport that runs most number of routes in China.", "output": "select t1.name from airports as t1 join routes as t2 on t1.apid = t2.src_apid where t1.country = 'China' group by t1.name order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as China. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as China. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name of the airport with the most number of routes that start in China?", "output": "select t1.name from airports as t1 join routes as t2 on t1.apid = t2.src_apid where t1.country = 'China' group by t1.name order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as China. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as China. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "Find the busiest destination airport that runs most number of routes in China.", "output": "select t1.name from airports as t1 join routes as t2 on t1.apid = t2.dst_apid where t1.country = 'China' group by t1.name order by count(*) desc limit 1"}, {"instruction": "flight_4 contains tables such as routes, airports, airlines. Table routes has columns such as rid, dst_apid, dst_ap, src_apid, src_ap, alid, airline, codeshare. rid is the primary key. Table airports has columns such as apid, name, city, country, x, y, elevation, iata, icao. apid is the primary key. The country contains values such as China. Table airlines has columns such as alid, name, iata, icao, callsign, country, active. alid is the primary key. The country contains values such as China. The alid of routes is the foreign key of alid of airlines. The src_apid of routes is the foreign key of apid of airports. The dst_apid of routes is the foreign key of apid of airports.", "input": "What is the name of the airport that is the destination of the most number of routes that start in China?", "output": "select t1.name from airports as t1 join routes as t2 on t1.apid = t2.dst_apid where t1.country = 'China' group by t1.name order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What is the id of the most recent order?", "output": "select order_id from orders order by date_order_placed desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the id of the order made most recently.", "output": "select order_id from orders order by date_order_placed desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "what are the order id and customer id of the oldest order?", "output": "select order_id, customer_id from orders order by date_order_placed limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the order id and customer id associated with the oldest order.", "output": "select order_id, customer_id from orders order by date_order_placed limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the id of the order whose shipment tracking number is \"3452\".", "output": "select order_id from shipments where shipment_tracking_number = \"3452\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which order's shipment tracking number is \"3452\"? Give me the id of the order.", "output": "select order_id from shipments where shipment_tracking_number = \"3452\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the ids of all the order items whose product id is 11.", "output": "select order_item_id from order_items where product_id = 11"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find all the order items whose product id is 11. What are the order item ids?", "output": "select order_item_id from order_items where product_id = 11"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as Packing. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "List the name of all the distinct customers who have orders with status \"Packing\".", "output": "select distinct t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"Packing\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as Packing. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which customers have orders with status \"Packing\"? Give me the customer names.", "output": "select distinct t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"Packing\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as On Road. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the details of all the distinct customers who have orders with status \"On Road\".", "output": "select distinct t1.customer_details from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"On Road\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as On Road. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are the distinct customers who have orders with status \"On Road\"? Give me the customer details?", "output": "select distinct t1.customer_details from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"On Road\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What is the name of the customer who has the most orders?", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which customer made the most orders? Find the customer name.", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What is the customer id of the customer who has the most orders?", "output": "select t1.customer_id from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the id of the customer who made the most orders.", "output": "select t1.customer_id from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. The customer_name contains values such as Jeramie. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Give me a list of id and status of orders which belong to the customer named \"Jeramie\".", "output": "select t2.order_id, t2.order_status from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Jeramie\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. The customer_name contains values such as Jeramie. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which orders are made by the customer named \"Jeramie\"? Give me the order ids and status.", "output": "select t2.order_id, t2.order_status from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Jeramie\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. The customer_name contains values such as Jeramie. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the dates of orders which belong to the customer named \"Jeramie\".", "output": "select t2.date_order_placed from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Jeramie\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. The customer_name contains values such as Jeramie. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are the dates of the orders made by the customer named \"Jeramie\"?", "output": "select t2.date_order_placed from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t1.customer_name = \"Jeramie\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.date_order_placed >= \"2009-01-01\" and t2.date_order_placed <= \"2010-01-01\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which customers made orders between 2009-01-01 and 2010-01-01? Find their names.", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.date_order_placed >= \"2009-01-01\" and t2.date_order_placed <= \"2010-01-01\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?", "output": "select distinct t2.product_id from orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.date_order_placed >= \"1975-01-01\" and t1.date_order_placed <= \"1976-01-01\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are the distinct ids of products ordered between 1975-01-01 and 1976-01-01??", "output": "select distinct t2.product_id from orders as t1 join order_items as t2 on t1.order_id = t2.order_id where t1.date_order_placed >= \"1975-01-01\" and t1.date_order_placed <= \"1976-01-01\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as On Road, Shipped. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the names of the customers who have order status both \"On Road\" and \"Shipped\".", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"On Road\" intersect select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"Shipped\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as On Road, Shipped. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer names.", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"On Road\" intersect select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"Shipped\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as On Road, Shipped. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the id of the customers who have order status both \"On Road\" and \"Shipped\".", "output": "select t1.customer_id from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"On Road\" intersect select t1.customer_id from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"Shipped\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as On Road, Shipped. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which customers have both \"On Road\" and \"Shipped\" as order status? List the customer ids.", "output": "select t1.customer_id from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"On Road\" intersect select t1.customer_id from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id where t2.order_status = \"Shipped\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "When was the order placed whose shipment tracking number is 3452? Give me the date.", "output": "select t1.date_order_placed from orders as t1 join shipments as t2 on t1.order_id = t2.order_id where t2.shipment_tracking_number = 3452"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "On which day was the order placed whose shipment tracking number is 3452?", "output": "select t1.date_order_placed from orders as t1 join shipments as t2 on t1.order_id = t2.order_id where t2.shipment_tracking_number = 3452"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What is the placement date of the order whose invoice number is 10?", "output": "select t1.date_order_placed from orders as t1 join shipments as t2 on t1.order_id = t2.order_id where t2.invoice_number = 10"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "On what day was the order with invoice number 10 placed?", "output": "select t1.date_order_placed from orders as t1 join shipments as t2 on t1.order_id = t2.order_id where t2.invoice_number = 10"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "List the count and id of each product in all the orders.", "output": "select count(*), t3.product_id from orders as t1 join order_items as t2 join products as t3 on t1.order_id = t2.order_id and t2.product_id = t3.product_id group by t3.product_id"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "For each product, return its id and the number of times it was ordered.", "output": "select count(*), t3.product_id from orders as t1 join order_items as t2 join products as t3 on t1.order_id = t2.order_id and t2.product_id = t3.product_id group by t3.product_id"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "List the name and count of each product in all orders.", "output": "select t3.product_name, count(*) from orders as t1 join order_items as t2 join products as t3 on t1.order_id = t2.order_id and t2.product_id = t3.product_id group by t3.product_id"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "For each product, show its name and the number of times it was ordered.", "output": "select t3.product_name, count(*) from orders as t1 join order_items as t2 join products as t3 on t1.order_id = t2.order_id and t2.product_id = t3.product_id group by t3.product_id"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as Shipped. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the ids of orders which are shipped after 2000-01-01.", "output": "select order_id from shipments where shipment_date > \"2000-01-01\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which orders have shipment after 2000-01-01? Give me the order ids.", "output": "select order_id from shipments where shipment_date > \"2000-01-01\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. The order_status contains values such as Shipped. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the id of the order which is shipped most recently.", "output": "select order_id from shipments where shipment_date = (select max(shipment_date) from shipments)"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which order has the most recent shipment? Give me the order id.", "output": "select order_id from shipments where shipment_date = (select max(shipment_date) from shipments)"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "List the names of all distinct products in alphabetical order.", "output": "select distinct product_name from products order by product_name"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Sort all the distinct products in alphabetical order.", "output": "select distinct product_name from products order by product_name"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "List the ids of all distinct orders ordered by placed date.", "output": "select distinct order_id from orders order by date_order_placed"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are ids of the all distinct orders, sorted by placement date?", "output": "select distinct order_id from orders order by date_order_placed"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What is the id of the order which has the most items?", "output": "select t1.order_id from orders as t1 join order_items as t2 on t1.order_id = t2.order_id group by t1.order_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which order deals with the most items? Return the order id.", "output": "select t1.order_id from orders as t1 join order_items as t2 on t1.order_id = t2.order_id group by t1.order_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What is the name of the customer who has the largest number of orders?", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the name of the customer who made the most orders.", "output": "select t1.customer_name from customers as t1 join orders as t2 on t1.customer_id = t2.customer_id group by t1.customer_id order by count(*) desc limit 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the invoice numbers which are created before 1989-09-03 or after 2007-12-25.", "output": "select invoice_number from invoices where invoice_date < \"1989-09-03\" or invoice_date > \"2007-12-25\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are the invoice numbers created before 1989-09-03 or after 2007-12-25?", "output": "select invoice_number from invoices where invoice_date < \"1989-09-03\" or invoice_date > \"2007-12-25\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the distinct details of invoices which are created before 1989-09-03 or after 2007-12-25.", "output": "select distinct invoice_details from invoices where invoice_date < \"1989-09-03\" or invoice_date > \"2007-12-25\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?", "output": "select distinct invoice_details from invoices where invoice_date < \"1989-09-03\" or invoice_date > \"2007-12-25\""}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "For each customer who has at least two orders, find the customer name and number of orders made.", "output": "select t2.customer_name, count(*) from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_id having count(*) >= 2"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which customers have made at least two orders? Give me each customer name and number of orders made.", "output": "select t2.customer_name, count(*) from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_id having count(*) >= 2"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Find the name of the customers who have at most two orders.", "output": "select t2.customer_name from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_id having count(*) <= 2"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are the names of the customers who have made two or less orders?", "output": "select t2.customer_name from orders as t1 join customers as t2 on t1.customer_id = t2.customer_id group by t2.customer_id having count(*) <= 2"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. The product_name contains values such as food. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "List the names of the customers who have once bought product \"food\".", "output": "select t1.customer_name from customers as t1 join orders as t2 join order_items as t3 join products as t4 on t1.customer_id = t2.customer_id and t2.order_id = t3.order_id and t3.product_id = t4.product_id where t4.product_name = \"food\" group by t1.customer_id having count(*) >= 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. The product_name contains values such as food. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "What are the names of the customers who bought product \"food\" at least once?", "output": "select t1.customer_name from customers as t1 join orders as t2 join order_items as t3 join products as t4 on t1.customer_id = t2.customer_id and t2.order_id = t3.order_id and t3.product_id = t4.product_id where t4.product_name = \"food\" group by t1.customer_id having count(*) >= 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. The product_name contains values such as food. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. The order_item_status contains values such as Cancel. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "List the names of customers who have once canceled the purchase of the product \"food\" (the item status is \"Cancel\").", "output": "select t1.customer_name from customers as t1 join orders as t2 join order_items as t3 join products as t4 on t1.customer_id = t2.customer_id and t2.order_id = t3.order_id and t3.product_id = t4.product_id where t3.order_item_status = \"Cancel\" and t4.product_name = \"food\" group by t1.customer_id having count(*) >= 1"}, {"instruction": "tracking_orders contains tables such as customers, invoices, orders, products, order_items, shipments, shipment_items. Table customers has columns such as customer_id, customer_name, customer_details. customer_id is the primary key. Table invoices has columns such as invoice_number, invoice_date, invoice_details. invoice_number is the primary key. Table orders has columns such as order_id, customer_id, order_status, date_order_placed, order_details. order_id is the primary key. Table products has columns such as product_id, product_name, product_details. product_id is the primary key. The product_name contains values such as food. Table order_items has columns such as order_item_id, product_id, order_id, order_item_status, order_item_details. order_item_id is the primary key. The order_item_status contains values such as Cancel. Table shipments has columns such as shipment_id, order_id, invoice_number, shipment_tracking_number, shipment_date, other_shipment_details. shipment_id is the primary key. Table shipment_items has columns such as shipment_id, order_item_id. is the primary key. The customer_id of orders is the foreign key of customer_id of customers. The product_id of order_items is the foreign key of product_id of products. The order_id of order_items is the foreign key of order_id of orders. The invoice_number of shipments is the foreign key of invoice_number of invoices. The order_id of shipments is the foreign key of order_id of orders. The shipment_id of shipment_items is the foreign key of shipment_id of shipments. The order_item_id of shipment_items is the foreign key of order_item_id of order_items.", "input": "Which customers have ever canceled the purchase of the product \"food\" (the item status is \"Cancel\")?", "output": "select t1.customer_name from customers as t1 join orders as t2 join order_items as t3 join products as t4 on t1.customer_id = t2.customer_id and t2.order_id = t3.order_id and t3.product_id = t4.product_id where t3.order_item_status = \"Cancel\" and t4.product_name = \"food\" group by t1.customer_id having count(*) >= 1"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. The gender contains values such as female. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "How many architects are female?", "output": "select count(*) from architect where gender = 'female'"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. The gender contains values such as male. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "List the name, nationality and id of all male architects ordered by their names lexicographically.", "output": "select name, nationality, id from architect where gender = 'male' order by name"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What is the maximum length in meters for the bridges and what are the architects' names?", "output": "select max(t1.length_meters), t2.name from bridge as t1 join architect as t2 on t1.architect_id = t2.id"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What is the average length in feet of the bridges?", "output": "select avg(length_feet) from bridge"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The type contains values such as Grondzeiler. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What are the names and year of construction for the mills of 'Grondzeiler' type?", "output": "select name, built_year from mill where type = 'Grondzeiler'"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What are the distinct names and nationalities of the architects who have ever built a mill?", "output": "select distinct t1.name, t1.nationality from architect as t1 join mill as t2 on t1.id = t2.architect_id"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The location contains values such as Donceel. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What are the names of the mills which are not located in 'Donceel'?", "output": "select name from mill where location != 'Donceel'"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. The nationality contains values such as Canadian, American. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What are the distinct types of mills that are built by American or Canadian architects?", "output": "select distinct t1.type from mill as t1 join architect as t2 on t1.architect_id = t2.id where t2.nationality = 'American' or t2.nationality = 'Canadian'"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What are the ids and names of the architects who built at least 3 bridges ?", "output": "select t1.id, t1.name from architect as t1 join bridge as t2 on t1.id = t2.architect_id group by t1.id having count(*) >= 3"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What is the id, name and nationality of the architect who built most mills?", "output": "select t1.id, t1.name, t1.nationality from architect as t1 join mill as t2 on t1.id = t2.architect_id group by t1.id order by count(*) desc limit 1"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What are the ids, names and genders of the architects who built two bridges or one mill?", "output": "select t1.id, t1.name, t1.gender from architect as t1 join bridge as t2 on t1.id = t2.architect_id group by t1.id having count(*) = 2 union select t1.id, t1.name, t1.gender from architect as t1 join mill as t2 on t1.id = t2.architect_id group by t1.id having count(*) = 1"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. The name contains values such as Rainbow Bridge, Kolob Arch. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?", "output": "select location from bridge where name = 'Kolob Arch' or name = 'Rainbow Bridge'"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "Which of the mill names contains the french word 'Moulin'?", "output": "select name from mill where name like '%moulin%'"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?", "output": "select distinct t1.name from mill as t1 join architect as t2 on t1.architect_id = t2.id join bridge as t3 on t3.architect_id = t2.id where t3.length_meters > 80"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "What is the most common mill type, and how many are there?", "output": "select type, count(*) from mill group by type order by count(*) desc limit 1"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "How many architects haven't built a mill before year 1850?", "output": "select count(*) from architect where id not in ( select architect_id from mill where built_year < 1850 );"}, {"instruction": "architecture contains tables such as architect, bridge, mill. Table architect has columns such as id, name, nationality, gender. id is the primary key. The nationality contains values such as American. Table bridge has columns such as architect_id, id, name, location, length_meters, length_feet. id is the primary key. Table mill has columns such as architect_id, id, location, name, type, built_year, notes. id is the primary key. The architect_id of bridge is the foreign key of id of architect. The architect_id of mill is the foreign key of id of architect.", "input": "show the name of all bridges that was designed by american archtect, and sort the result by the bridge feet length.", "output": "select t1.name from bridge as t1 join architect as t2 on t1.architect_id = t2.id where t2.nationality = 'American' order by t1.length_feet"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "How many book clubs are there?", "output": "select count(*) from book_club"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Count the number of book clubs.", "output": "select count(*) from book_club"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "show the titles, and authors or editors for all books made after the year 1989.", "output": "select book_title, author_or_editor from book_club where year > 1989"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are the titles and authors or editors that correspond to books made after 1989?", "output": "select book_title, author_or_editor from book_club where year > 1989"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all distinct publishers for books.", "output": "select distinct publisher from book_club"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are all the different book publishers?", "output": "select distinct publisher from book_club"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show the years, book titles, and publishers for all books, in descending order by year.", "output": "select year, book_title, publisher from book_club order by year desc"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are the years, titles, and publishers for all books, ordered by year descending?", "output": "select year, book_title, publisher from book_club order by year desc"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all publishers and the number of books for each publisher.", "output": "select publisher, count(*) from book_club group by publisher"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "How many books are there for each publisher?", "output": "select publisher, count(*) from book_club group by publisher"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What is the publisher with most number of books?", "output": "select publisher from book_club group by publisher order by count(*) desc limit 1"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Return the publisher that has published the most books.", "output": "select publisher from book_club group by publisher order by count(*) desc limit 1"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all book categories and the number of books in each category.", "output": "select category, count(*) from book_club group by category"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "How many books fall into each category?", "output": "select category, count(*) from book_club group by category"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "List categories that have at least two books after year 1989.", "output": "select category from book_club where year > 1989 group by category having count(*) >= 2"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What categories have two or more corresponding books that were made after 1989?", "output": "select category from book_club where year > 1989 group by category having count(*) >= 2"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show publishers with a book published in 1989 and a book in 1990.", "output": "select publisher from book_club where year = 1989 intersect select publisher from book_club where year = 1990"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are the publishers who have published a book in both 1989 and 1990?", "output": "select publisher from book_club where year = 1989 intersect select publisher from book_club where year = 1990"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all publishers which do not have a book in 1989.", "output": "select publisher from book_club except select publisher from book_club where year = 1989"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Which publishers did not publish a book in 1989?", "output": "select publisher from book_club except select publisher from book_club where year = 1989"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all movie titles, years, and directors, ordered by budget.", "output": "select title, year, director from movie order by budget_million"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are the titles, years, and directors of all movies, ordered by budget in millions?", "output": "select title, year, director from movie order by budget_million"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "How many movie directors are there?", "output": "select count (distinct director) from movie"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Count the number of different directors.", "output": "select count (distinct director) from movie"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What is the title and director for the movie with highest worldwide gross in the year 2000 or before?", "output": "select title, director from movie where year <= 2000 order by gross_worldwide desc limit 1"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.", "output": "select title, director from movie where year <= 2000 order by gross_worldwide desc limit 1"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all director names who have a movie in both year 1999 and 2000.", "output": "select director from movie where year = 2000 intersect select director from movie where year = 1999"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Which directors had a movie both in the year 1999 and 2000?", "output": "select director from movie where year = 2000 intersect select director from movie where year = 1999"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all director names who have a movie in the year 1999 or 2000.", "output": "select director from movie where year = 1999 or year = 2000"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Which directors had a movie in either 1999 or 2000?", "output": "select director from movie where year = 1999 or year = 2000"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What is the average, maximum, and minimum budget for all movies before 2000.", "output": "select avg(budget_million), max(budget_million), min(budget_million) from movie where year < 2000"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.", "output": "select avg(budget_million), max(budget_million), min(budget_million) from movie where year < 2000"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. The publisher contains values such as Alyson. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "List all company names with a book published by Alyson.", "output": "select t1.company_name from culture_company as t1 join book_club as t2 on t1.book_club_id = t2.book_club_id where t2.publisher = 'Alyson'"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. The publisher contains values such as Alyson. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are all the company names that have a book published by Alyson?", "output": "select t1.company_name from culture_company as t1 join book_club as t2 on t1.book_club_id = t2.book_club_id where t2.publisher = 'Alyson'"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The incorporated_in contains values such as China. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show the movie titles and book titles for all companies in China.", "output": "select t1.title, t3.book_title from movie as t1 join culture_company as t2 on t1.movie_id = t2.movie_id join book_club as t3 on t3.book_club_id = t2.book_club_id where t2.incorporated_in = 'China'"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The incorporated_in contains values such as China. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are the titles of movies and books corresponding to companies incorporated in China?", "output": "select t1.title, t3.book_title from movie as t1 join culture_company as t2 on t1.movie_id = t2.movie_id join book_club as t3 on t3.book_club_id = t2.book_club_id where t2.incorporated_in = 'China'"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "Show all company names with a movie directed in year 1999.", "output": "select t2.company_name from movie as t1 join culture_company as t2 on t1.movie_id = t2.movie_id where t1.year = 1999"}, {"instruction": "culture_company contains tables such as book_club, movie, culture_company. Table book_club has columns such as book_club_id, year, author_or_editor, book_title, publisher, category, result. book_club_id is the primary key. Table movie has columns such as movie_id, title, year, director, budget_million, gross_worldwide. movie_id is the primary key. Table culture_company has columns such as company_name, type, incorporated_in, group_equity_shareholding, book_club_id, movie_id. company_name is the primary key. The movie_id of culture_company is the foreign key of movie_id of movie. The book_club_id of culture_company is the foreign key of book_club_id of book_club.", "input": "What are all company names that have a corresponding movie directed in the year 1999?", "output": "select t2.company_name from movie as t1 join culture_company as t2 on t1.movie_id = t2.movie_id where t1.year = 1999"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest city in wyoming", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what wyoming city has the largest population", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest city in wyoming", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the most populated area of wyoming", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which city in wyoming has the largest population", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what cities in wyoming have the highest number of citizens", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what cities in wyoming have the highest populations", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most populous city in wyoming", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest city in wyoming by population", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest city of wyoming", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the city in wyoming with the largest population", "output": "select city_name from city where population = ( select max ( population ) from city where state_name = \"wyoming\" ) and state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers run through the state with the largest city in the us", "output": "select river_name from river where traverse in ( select state_name from city where population = ( select max ( population ) from city ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how big is new mexico", "output": "select area from state where state_name = \"new mexico\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of new mexico", "output": "select area from state where state_name = \"new mexico\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how large is new mexico", "output": "select area from state where state_name = \"new mexico\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of the new mexico state", "output": "select area from state where state_name = \"new mexico\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the size of new mexico", "output": "select area from state where state_name = \"new mexico\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of new mexico in square kilometers", "output": "select area from state where state_name = \"new mexico\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people reside in california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many residents live in california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how much population does california have", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the population of california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people are in the state of california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what can you tell me about the population of california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people are there in california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many citizens in california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people stay in california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many citizens live in california", "output": "select population from state where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the smallest population", "output": "select state_name from state where population = ( select min ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the least populous state", "output": "select state_name from state where population = ( select min ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the lowest population", "output": "select state_name from state where population = ( select min ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the cities in texas", "output": "select city_name from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "tell me what cities are in texas", "output": "select city_name from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what cities are located in texas", "output": "select city_name from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the cities in texas", "output": "select city_name from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what cities in texas", "output": "select city_name from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the cities which are in texas", "output": "select city_name from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of the state with the capital albany", "output": "select area from state where capital = \"albany\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the lakes in california", "output": "select lake_name from lake where state_name = \"california\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name the major lakes in michigan", "output": "select lake_name from lake where area > 750 and state_name = \"michigan\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the states", "output": "select state_name from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "list the states", "output": "select state_name from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me all the states of usa", "output": "select state_name from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states do ohio river flow through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states does the ohio river run through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border the ohio river", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states border the ohio river", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states does the ohio run through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the ohio river", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states does the ohio river run through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states does the ohio run through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states does the ohio river pass through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the states that the ohio run through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the ohio river", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states have rivers named ohio", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "through which states does the ohio flow", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states are next to the ohio", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "through which states does the ohio run", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states does the ohio river go through", "output": "select traverse from river where river_name = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the largest population", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most populous state", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state is the largest in population", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the biggest population", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the greatest population", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the most population", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the most people", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the most people", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most populous state in the us", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the highest population", "output": "select state_name from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest elevation in pennsylvania", "output": "select lowest_elevation from highlow where state_name = \"pennsylvania\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in each state whose lowest point is sea level", "output": "select highest_point, state_name from highlow where lowest_elevation = 0;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the length of the longest river in the usa", "output": "select length from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how long is the longest river in the usa", "output": "select length from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river flowing through texas", "output": "select river_name from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest river in texas state", "output": "select river_name from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in texas", "output": "select river_name from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest river in texas", "output": "select river_name from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river that flows through texas", "output": "select river_name from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the biggest rivers in texas", "output": "select river_name from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers are in idaho", "output": "select count ( river_name ) from river where traverse = \"idaho\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the number of rivers in idaho", "output": "select count ( river_name ) from river where traverse = \"idaho\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers does idaho have", "output": "select count ( river_name ) from river where traverse = \"idaho\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers are there in idaho", "output": "select count ( river_name ) from river where traverse = \"idaho\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers run through idaho", "output": "select count ( river_name ) from river where traverse = \"idaho\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers are found in idaho", "output": "select count ( river_name ) from river where traverse = \"idaho\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers in idaho", "output": "select count ( river_name ) from river where traverse = \"idaho\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states neighbor kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states border kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the states that border kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state borders kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states are next to kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states surround kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state borders kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the neighboring states for kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states adjoin kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "states bordering kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state border kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the adjacent state of kentucky", "output": "select border from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name all the rivers in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "rivers in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are all the rivers in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the rivers in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers are in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers are there in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers run through illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers flow through illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what river flows through illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the rivers in the state of illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name the rivers in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the rivers of illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers are in illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers flow through illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the river that cross over illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what river runs through illinois", "output": "select river_name from river where traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state is springfield in", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "springfield is in what state", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states have cities named springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states have cities named springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state is springfield in", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states have a city named springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the city springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states have towns named springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state is springfield located in", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "in which state is springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state is the city springfield located in", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states in the united states have a city of springfield", "output": "select state_name from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the state with the largest area", "output": "select population from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the largest state", "output": "select population from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people lived in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "number of people in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of boulder city", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how big is the city of boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "population of boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "people in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many inhabitants does boulder have", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "number of citizens in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many citizens in boulder", "output": "select population from city where city_name = \"boulder\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest city in alaska", "output": "select city_name from city where population = ( select min ( population ) from city where state_name = \"alaska\" ) and state_name = \"alaska\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states lie on the largest river in the united states", "output": "select traverse from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states does the longest river run through", "output": "select traverse from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the longest river", "output": "select traverse from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the states through which the longest river runs", "output": "select traverse from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states does the longest river cross", "output": "select traverse from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population density of the state with the smallest area", "output": "select density from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population density of the smallest state", "output": "select density from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states have points higher than the highest point in colorado", "output": "select state_name from highlow where highest_elevation > ( select highest_elevation from highlow where state_name = \"colorado\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states have points that are higher than the highest point in colorado", "output": "select state_name from highlow where highest_elevation > ( select highest_elevation from highlow where state_name = \"colorado\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states high point are higher than that of colorado", "output": "select state_name from highlow where highest_elevation > ( select highest_elevation from highlow where state_name = \"colorado\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest elevation in delaware", "output": "select highest_elevation from highlow where state_name = \"delaware\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how high is the highest point of delaware", "output": "select highest_elevation from highlow where state_name = \"delaware\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how tall is the highest point in delaware", "output": "select highest_elevation from highlow where state_name = \"delaware\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in delaware in meters", "output": "select highest_elevation from highlow where state_name = \"delaware\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how high is the highest point in delaware", "output": "select highest_elevation from highlow where state_name = \"delaware\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the longest river that passes through the us", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which is the longest river in usa", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in america", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name the longest river in us", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what river is the longest one in the united states", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in the us", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in the united states", "output": "select river_name from river where length = ( select max ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the city with the largest population", "output": "select state_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the largest city", "output": "select state_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the largest city", "output": "select state_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the city with the most population", "output": "select state_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest city in the largest state", "output": "select city_name from city where population = ( select min ( population ) from city where state_name in ( select state_name from state where area = ( select max ( area ) from state ) ) ) and state_name in ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state is the biggest", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the largest area", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the largest area", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest state in continental us", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "state the state with the largest area", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state in usa", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest state", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest state in the usa", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the largest state", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state in the us", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state", "output": "select state_name from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the highest points of states surrounding mississippi", "output": "select highest_point from highlow where state_name in ( select border from border_info where state_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the high points of states surrounding mississippi", "output": "select highest_point from highlow where state_name in ( select border from border_info where state_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in states bordering colorado", "output": "select highest_point from highlow where state_name in ( select border from border_info where state_name = \"colorado\" ) order by highest_elevation desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the states bordering colorado", "output": "select highest_point from highlow where state_name in ( select border from border_info where state_name = \"colorado\" ) order by highest_elevation desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the lowest population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the lowest population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the lowest population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the smallest population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the sparsest population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the sparsest population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the least population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the least population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the smallest population density", "output": "select state_name from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the highest point in texas", "output": "select highest_point from highlow where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in texas", "output": "select highest_point from highlow where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the high point of texas", "output": "select highest_point from highlow where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest mountain in texas", "output": "select highest_point from highlow where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "could you tell me what is the highest point in the state of texas", "output": "select highest_point from highlow where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states have no bordering state", "output": "select state_name from state where state_name not in ( select state_name from border_info );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name the states which have no surrounding states", "output": "select state_name from state where state_name not in ( select state_name from border_info );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states border no other states", "output": "select state_name from state where state_name not in ( select state_name from border_info );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of the state with the smallest population density", "output": "select area from state where density = ( select min ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "count the states which have elevations lower than what alabama has", "output": "select count ( state_name ) from highlow where lowest_elevation < ( select lowest_elevation from highlow where state_name = \"alabama\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how high is guadalupe peak", "output": "select highest_elevation from highlow where highest_point = \"guadalupe peak\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how tall is guadalupe peak", "output": "select highest_elevation from highlow where highest_point = \"guadalupe peak\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the maximum elevation of guadalupe peak", "output": "select highest_elevation from highlow where highest_point = \"guadalupe peak\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how high is the highest point in america", "output": "select max ( highest_elevation ) from highlow;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest elevation in the united states", "output": "select max ( highest_elevation ) from highlow;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the elevation of the highest point in the usa", "output": "select max ( highest_elevation ) from highlow;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the height of the highest point in the usa", "output": "select max ( highest_elevation ) from highlow;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how long is the rio grande river", "output": "select length from river where river_name = \"rio grande\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the length of the rio grande river", "output": "select length from river where river_name = \"rio grande\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what length is the rio grande", "output": "select length from river where river_name = \"rio grande\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how long is the rio grande", "output": "select length from river where river_name = \"rio grande\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how long is the rio grande river in miles", "output": "select length from river where river_name = \"rio grande\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how long is rio grande", "output": "select length from river where river_name = \"rio grande\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how long is the longest river in texas", "output": "select length from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the length of the longest river that runs through texas", "output": "select length from river where length = ( select max ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many capitals does rhode island have", "output": "select count ( capital ) from state where state_name = \"rhode island\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities are there in the united states", "output": "select count ( city_name ) from city;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities does the usa have", "output": "select count ( city_name ) from city;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities are there in the us", "output": "select count ( city_name ) from city;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities are there in usa", "output": "select count ( city_name ) from city;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities are there in us", "output": "select count ( city_name ) from city;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many major cities are there", "output": "select count ( city_name ) from city where population > 150000;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many citizens does the biggest city have in the usa", "output": "select population from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many colorado rivers are there", "output": "select count ( river_name ) from river where river_name = \"colorado\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers are called colorado", "output": "select count ( river_name ) from river where river_name = \"colorado\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of seattle washington", "output": "select population from city where city_name = \"seattle\" and state_name = \"washington\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in seattle washington", "output": "select population from city where city_name = \"seattle\" and state_name = \"washington\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in the biggest city in alaska state", "output": "select population from city where population = ( select max ( population ) from city where state_name = \"alaska\" ) and state_name = \"alaska\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how large is the largest city in alaska", "output": "select population from city where population = ( select max ( population ) from city where state_name = \"alaska\" ) and state_name = \"alaska\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in the capital of texas", "output": "select population from city where city_name = ( select capital from state where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the size of the capital of texas", "output": "select population from city where city_name = ( select capital from state where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in the united states", "output": "select sum ( population ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the combined population of all 50 states", "output": "select sum ( population ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states are in the usa", "output": "select count ( state_name ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states are there", "output": "select count ( state_name ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states are there in the usa", "output": "select count ( state_name ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states does usa have", "output": "select count ( state_name ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states are in the united states", "output": "select count ( state_name ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states are there in united states", "output": "select count ( state_name ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states border kentucky", "output": "select count ( border ) from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states does kentucky border", "output": "select count ( border ) from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "kentucky borders how many states", "output": "select count ( border ) from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "number of states bordering kentucky", "output": "select count ( border ) from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the number of neighboring states for kentucky", "output": "select count ( border ) from border_info where state_name = \"kentucky\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states border the state with the largest population", "output": "select count ( border ) from border_info where state_name in ( select state_name from state where population = ( select max ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states do not have rivers", "output": "select count ( distinct state_name ) from state where state_name not in ( select traverse from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states have a higher point than the highest point of the state with the largest capital city in the us", "output": "select count ( state_name ) from highlow where highest_elevation > ( select highest_elevation from highlow where state_name = ( select state_name from state where capital = ( select city_name from city where population = ( select max ( population ) from city ) ) ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name the major rivers in illinois", "output": "select river_name from river where length > 750 and traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major rivers in illinois", "output": "select river_name from river where length > 750 and traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are major rivers in illinois", "output": "select river_name from river where length > 750 and traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what major rivers run through illinois", "output": "select river_name from river where length > 750 and traverse = \"illinois\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "through which states does the longest river in texas run", "output": "select traverse from river where length = ( select max ( length ) from river where traverse = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the capital city in texas", "output": "select capital from state where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of texas", "output": "select capital from state where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the texas state", "output": "select capital from state where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is capital of texas", "output": "select capital from state where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state texas", "output": "select capital from state where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "can you tell me the capital of texas", "output": "select capital from state where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the capitals of states that border texas", "output": "select t2.capital from state as t2 join border_info as t1 on t2.state_name = t1.border where t1.state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the capital cities of the states which border texas", "output": "select t2.capital from state as t2 join border_info as t1 on t2.state_name = t1.border where t1.state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the capitals of the states that border texas", "output": "select t2.capital from state as t2 join border_info as t1 on t2.state_name = t1.border where t1.state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which capitals are in the states that border texas", "output": "select t2.capital from state as t2 join border_info as t1 on t2.state_name = t1.border where t1.state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the cities in states through which the mississippi runs", "output": "select city_name from city where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the cities of the state with the highest point", "output": "select city_name from city where state_name in ( select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the highest points of all the states", "output": "select highest_point from highlow;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities in kansas", "output": "select city_name from city where population > 150000 and state_name = \"kansas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities in the state of kansas", "output": "select city_name from city where population > 150000 and state_name = \"kansas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what major cities are located in kansas", "output": "select city_name from city where population > 150000 and state_name = \"kansas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "show major cities in kansas", "output": "select city_name from city where population > 150000 and state_name = \"kansas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the names of the major cities in kansas", "output": "select city_name from city where population > 150000 and state_name = \"kansas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities of kansas", "output": "select city_name from city where population > 150000 and state_name = \"kansas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the major cities in kansas", "output": "select city_name from city where population > 150000 and state_name = \"kansas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities in states through which the mississippi runs", "output": "select city_name from city where population > 150000 and state_name in ( select traverse from river where length > 750 and river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities in the usa", "output": "select city_name from city where population > 150000;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities of the united states", "output": "select city_name from city where population > 150000;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities of the us", "output": "select city_name from city where population > 150000;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the population densities of each us state", "output": "select density from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of states through which the mississippi river run", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of states through which the mississippi runs", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of the states through which the mississippi runs", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of states through which the mississippi river runs", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of the states through which the mississippi run", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of the states through which the mississippi river run", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of states through which the mississippi run", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of the states through which the mississippi river runs", "output": "select population from state where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of states which border texas", "output": "select t2.population from state as t2 join border_info as t1 on t2.state_name = t1.border where t1.state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of the major cities of wisconsin", "output": "select population from city where population > 150000 and state_name = \"wisconsin\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the populations of all the major cities in wisconsin", "output": "select population from city where population > 150000 and state_name = \"wisconsin\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the major cities in wisconsin", "output": "select population from city where population > 150000 and state_name = \"wisconsin\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what city has the most people", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what city in the united states has the highest population density", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most populous city", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which us city has the highest population density", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest city in the usa", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "whats the largest city", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what city has the largest population", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest city in the us", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest city in usa", "output": "select city_name from city where population = ( select max ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest capital city in the us", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest capital city in the usa", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state capital in population", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest capital", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most populated capital in the usa", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what capital is the largest in the us", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what capital has the largest population", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is largest capital", "output": "select city_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of states that have cities named durham", "output": "select t2.capital from state as t2 join city as t1 on t2.state_name = t1.state_name where t1.city_name = \"durham\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the smallest state", "output": "select capital from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state with the largest population density", "output": "select distinct capital from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state with the largest population", "output": "select capital from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state with the most inhabitants", "output": "select capital from state where population = ( select max ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state with the longest river", "output": "select capital from state where state_name in ( select traverse from river where length = ( select max ( length ) from river ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the combined area of all 50 states", "output": "select sum ( area ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of all the states combined", "output": "select sum ( area ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many square kilometers in the us", "output": "select sum ( area ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the total area of the usa", "output": "select sum ( area ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the density of the wyoming", "output": "select density from state where state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population density of wyoming", "output": "select density from state where state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the density of wyoming", "output": "select density from state where state_name = \"wyoming\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest mountain in the us", "output": "select mountain_name from mountain where mountain_altitude = ( select max ( mountain_altitude ) from mountain );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest mountain in us", "output": "select mountain_name from mountain where mountain_altitude = ( select max ( mountain_altitude ) from mountain );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the tallest mountain in america", "output": "select mountain_name from mountain where mountain_altitude = ( select max ( mountain_altitude ) from mountain );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the tallest mountain in the united states", "output": "select mountain_name from mountain where mountain_altitude = ( select max ( mountain_altitude ) from mountain );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the state with capital des moines", "output": "select highest_point from highlow where state_name in ( select state_name from state where capital = \"des moines\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the state with the capital des moines", "output": "select highest_point from highlow where state_name in ( select state_name from state where capital = \"des moines\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the usa", "output": "select highest_point from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point of the usa", "output": "select highest_point from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the country", "output": "select highest_point from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the us", "output": "select highest_point from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the united states", "output": "select highest_point from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point of the state with the smallest population density", "output": "select highest_point from highlow where state_name in ( select state_name from state where density = ( select min ( density ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest city in smallest state through which the mississippi runs", "output": "select city_name from city where state_name in ( select state_name from state where state_name in ( select traverse from river where river_name = \"mississippi\" ) and area = ( select min ( area ) from state where state_name in ( select traverse from river where river_name = \"mississippi\" ) ) ) order by population desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest city in the smallest state in the usa", "output": "select city_name from city where population = ( select max ( population ) from city where state_name in ( select state_name from state where area = ( select min ( area ) from state ) ) ) and state_name in ( select state_name from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest city in the smallest state", "output": "select city_name from city where population = ( select max ( population ) from city where state_name in ( select state_name from state where area = ( select min ( area ) from state ) ) ) and state_name in ( select state_name from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state bordering california", "output": "select state_name from state where area = ( select max ( area ) from state where state_name in ( select border from border_info where state_name = \"california\" ) ) and state_name in ( select border from border_info where state_name = \"california\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state that borders california", "output": "select state_name from state where area = ( select max ( area ) from state where state_name in ( select border from border_info where state_name = \"california\" ) ) and state_name in ( select border from border_info where state_name = \"california\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state that borders california is the largest", "output": "select state_name from state where area = ( select max ( area ) from state where state_name in ( select border from border_info where state_name = \"california\" ) ) and state_name in ( select border from border_info where state_name = \"california\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in the largest state", "output": "select river_name from river where length = ( select max ( length ) from river where traverse in ( select state_name from state where area = ( select max ( area ) from state ) ) ) and traverse in ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in the states that border tennessee", "output": "select river_name from river where length = ( select max ( length ) from river where traverse in ( select border from border_info where state_name = \"tennessee\" ) ) and traverse in ( select border from border_info where state_name = \"tennessee\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river that flows through a state that borders tennessee", "output": "select river_name from river where length = ( select max ( length ) from river where traverse in ( select border from border_info where state_name = \"tennessee\" ) ) and traverse in ( select border from border_info where state_name = \"tennessee\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river that runs through a state that borders tennessee", "output": "select river_name from river where length = ( select max ( length ) from river where traverse in ( select border from border_info where state_name = \"tennessee\" ) ) and traverse in ( select border from border_info where state_name = \"tennessee\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in the state with the most major cities", "output": "select river_name from river where traverse = ( select state_name from city where population > 150000 group by state_name order by count ( city_name ) desc limit 1 ) order by length desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point in iowa", "output": "select lowest_point from highlow where state_name = \"iowa\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point in iowa in meters", "output": "select lowest_point from highlow where state_name = \"iowa\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point in the state of iowa", "output": "select lowest_point from highlow where state_name = \"iowa\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the lowest point in iowa", "output": "select lowest_point from highlow where state_name = \"iowa\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point of iowa", "output": "select lowest_point from highlow where state_name = \"iowa\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the lowest spot in iowa", "output": "select lowest_point from highlow where state_name = \"iowa\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point in usa", "output": "select lowest_point from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point in the united states", "output": "select lowest_point from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the lowest point in the us", "output": "select lowest_point from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point of the us", "output": "select lowest_point from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point of all states through which the mississippi river runs through", "output": "select lowest_point from highlow where state_name in ( select traverse from river where river_name = \"mississippi\" ) order by lowest_elevation limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which is the lowest point of the states that the mississippi runs through", "output": "select lowest_point from highlow where state_name in ( select traverse from river where river_name = \"mississippi\" ) order by lowest_elevation limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most dense state in the usa", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the highest population density", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the greatest density", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the highest population density", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the greatest population density", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the largest population density", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the largest density in usa", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the largest population density", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the largest density", "output": "select state_name from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most populous state through which the mississippi runs", "output": "select state_name from state where population = ( select max ( population ) from state where state_name in ( select traverse from river where river_name = \"mississippi\" ) ) and state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state which the mississippi runs through has the largest population", "output": "select state_name from state where population = ( select max ( population ) from state where state_name in ( select traverse from river where river_name = \"mississippi\" ) ) and state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population density of the largest state", "output": "select density from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the largest city in the state with the largest area", "output": "select population from city where population = ( select max ( population ) from city where state_name in ( select state_name from state where area = ( select max ( area ) from state ) ) ) and state_name in ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the smallest state", "output": "select population from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the state with the highest population density", "output": "select population from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in the state with the largest population density", "output": "select population from state where density = ( select max ( density ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest city in the usa", "output": "select city_name from city where population = ( select min ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest city in the us", "output": "select city_name from city where population = ( select min ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what city has the least population", "output": "select city_name from city where population = ( select min ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the city with the smallest population", "output": "select city_name from city where population = ( select min ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest state bordering texas", "output": "select state_name from state where area = ( select min ( area ) from state where state_name in ( select border from border_info where state_name = \"texas\" ) ) and state_name in ( select border from border_info where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest state that borders texas", "output": "select state_name from state where area = ( select min ( area ) from state where state_name in ( select border from border_info where state_name = \"texas\" ) ) and state_name in ( select border from border_info where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the smallest area that borders texas", "output": "select state_name from state where area = ( select min ( area ) from state where state_name in ( select border from border_info where state_name = \"texas\" ) ) and state_name in ( select border from border_info where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest state that the mississippi river runs through", "output": "select state_name from state where area = ( select min ( area ) from state where state_name in ( select traverse from river where river_name = \"mississippi\" ) ) and state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the smallest area", "output": "select state_name from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which is the smallest state", "output": "select state_name from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state is the smallest", "output": "select state_name from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest state in the usa", "output": "select state_name from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest state by area", "output": "select state_name from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the smallest area", "output": "select state_name from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the total length of all rivers in the usa", "output": "select sum ( length ) from river;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what river flows through the most states", "output": "select river_name from river group by ( river_name ) order by count ( distinct traverse ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which river goes through the most states", "output": "select river_name from river group by ( river_name ) order by count ( distinct traverse ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which river runs through most states", "output": "select river_name from river group by ( river_name ) order by count ( distinct traverse ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which river traverses most states", "output": "select river_name from river group by ( river_name ) order by count ( distinct traverse ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what river traverses the most states", "output": "select river_name from river group by ( river_name ) order by count ( distinct traverse ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which river runs through the most states", "output": "select river_name from river group by ( river_name ) order by count ( distinct traverse ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what river runs through the most states", "output": "select river_name from river group by ( river_name ) order by count ( distinct traverse ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers are in states that border alabama", "output": "select river_name from river where traverse in ( select border from border_info where state_name = \"alabama\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers run through states bordering alabama", "output": "select river_name from river where traverse in ( select border from border_info where state_name = \"alabama\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers flow through states that alabama borders", "output": "select river_name from river where traverse in ( select border from border_info where state_name = \"alabama\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state bordering oklahoma has the largest population", "output": "select state_name from state where state_name in ( select border from border_info where state_name = \"oklahoma\" ) order by population desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which of the states bordering oklahoma has the largest population", "output": "select state_name from state where state_name in ( select border from border_info where state_name = \"oklahoma\" ) order by population desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state that borders oklahoma has the highest population", "output": "select state_name from state where state_name in ( select border from border_info where state_name = \"oklahoma\" ) order by population desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the most populated state bordering oklahoma", "output": "select state_name from state where state_name in ( select border from border_info where state_name = \"oklahoma\" ) order by population desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state contains the highest point of those the colorado river traverses", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow where state_name in ( select traverse from river where river_name = \"colorado\" ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the largest capital", "output": "select state_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state 's capital city is the largest", "output": "select state_name from city where population = ( select max ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the longest river", "output": "select distinct traverse from river where length = ( select max ( distinct length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the smallest urban population", "output": "select state_name from city group by state_name order by sum ( population ) limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border states that border colorado", "output": "select border from border_info where state_name in ( select border from border_info where state_name = \"colorado\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border states that the mississippi runs through", "output": "select border from border_info where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states border states through which the mississippi traverses", "output": "select border from border_info where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border states which the mississippi runs through", "output": "select border from border_info where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border texas and have a major river", "output": "select state_name from border_info where border = \"texas\" and state_name in ( select traverse from river where length > 750 );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border the most populous state", "output": "select border from border_info where state_name = ( select state_name from state where population = ( select max ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the states that border the state with the greatest population", "output": "select border from border_info where state_name = ( select state_name from state where population = ( select max ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border the state with the smallest area", "output": "select border from border_info where state_name = ( select state_name from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states border the state with the smallest area", "output": "select border from border_info where state_name = ( select state_name from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states contain at least one major rivers", "output": "select traverse from river where length > 750;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where are mountains", "output": "select state_name from mountain;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the highest mountain of the united states", "output": "select state_name from mountain where mountain_altitude = ( select max ( mountain_altitude ) from mountain );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the highest peak in the country", "output": "select state_name from mountain where mountain_altitude = ( select max ( mountain_altitude ) from mountain );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is the smallest city", "output": "select state_name from city where population = ( select min ( population ) from city );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which is the density of the state that the largest river in the united states runs through", "output": "select density from state where state_name in ( select traverse from river where length = ( select max ( length ) from river ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which is the highest peak not in alaska", "output": "select mountain_name from mountain where mountain_altitude = ( select max ( mountain_altitude ) from mountain where state_name != \"alaska\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers do not run through tennessee", "output": "select river_name from river where river_name not in ( select river_name from river where traverse = \"tennessee\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers do not run through tennessee", "output": "select river_name from river where river_name not in ( select river_name from river where traverse = \"tennessee\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers do not run through usa", "output": "select river_name from river where country_name != \"usa\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers run through states that border the state with the capital atlanta", "output": "select river_name from river where traverse in ( select border from border_info where state_name in ( select state_name from state where capital = \"atlanta\" ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers run through the states that border the state with the capital atlanta", "output": "select river_name from river where traverse in ( select border from border_info where state_name in ( select state_name from state where capital = \"atlanta\" ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state capital has the smallest population", "output": "select city_name from city where population = ( select min ( t1.population ) from state as t2 join city as t1 on t2.capital = t1.city_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the highest elevation", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the highest point", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the highest elevation", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "in which state does the highest point in usa exist", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has highest elevation", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the highest elevation in the united states", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state that contains the highest point", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state contains the highest point in the us", "output": "select state_name from highlow where highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the lowest elevation", "output": "select state_name from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the name of the state with the lowest point", "output": "select state_name from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the state with the lowest point", "output": "select state_name from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the lowest point that borders idaho", "output": "select state_name from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow where state_name in ( select border from border_info where state_name = \"idaho\" ) ) and state_name in ( select border from border_info where state_name = \"idaho\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state has the smallest average urban population", "output": "select state_name from city group by state_name order by avg ( population ) limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state is mount whitney in", "output": "select state_name from mountain where mountain_name = \"whitney\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "in what state is mount whitney", "output": "select state_name from mountain where mountain_name = \"whitney\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is mount whitney", "output": "select state_name from mountain where mountain_name = \"whitney\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is mount whitney located", "output": "select state_name from mountain where mountain_name = \"whitney\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states have a river", "output": "select traverse from river;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states have rivers running through them", "output": "select traverse from river;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states have a major city named austin", "output": "select state_name from city where city_name = \"austin\" and population > 150000;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest city in a state that borders california", "output": "select city_name from city where population = ( select max ( population ) from city where state_name in ( select border from border_info where state_name = \"california\" ) ) and state_name in ( select border from border_info where state_name = \"california\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest city in states that border california", "output": "select city_name from city where population = ( select max ( population ) from city where state_name in ( select border from border_info where state_name = \"california\" ) ) and state_name in ( select border from border_info where state_name = \"california\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers do not traverse the state with the capital albany", "output": "select count ( river_name ) from river where traverse not in ( select state_name from state where capital = \"albany\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the shortest river in texas", "output": "select river_name from river where length = ( select min ( length ) from river where traverse = \"texas\" ) and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities in the smallest state in the us", "output": "select city_name from city where population > 150000 and state_name = ( select state_name from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the capital of the largest state through which the mississippi runs", "output": "select population from city where city_name = ( select capital from state where area = ( select max ( t1.area ) from state as t1 join river as t2 on t1.state_name = t2.traverse where t2.river_name = \"mississippi\" ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the shortest river in the usa", "output": "select river_name from river where length = ( select min ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the shortest river", "output": "select river_name from river where length = ( select min ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the shortest river in the us", "output": "select river_name from river where length = ( select min ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the shortest river in the united states", "output": "select river_name from river where length = ( select min ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which is the shortest river", "output": "select river_name from river where length = ( select min ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state that borders the state that borders texas", "output": "select capital from state where state_name in ( select border from border_info where state_name in ( select border from border_info where state_name = \"texas\" ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest city of the smallest state in the us", "output": "select city_name from city where population = ( select min ( population ) from city where state_name in ( select state_name from state where area = ( select min ( area ) from state ) ) ) and state_name in ( select state_name from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the largest state that borders texas", "output": "select population from state where area = ( select max ( area ) from state where state_name in ( select border from border_info where state_name = \"texas\" ) ) and state_name in ( select border from border_info where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state is salem the capital of", "output": "select state_name from state where capital = \"salem\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states capital is salem", "output": "select state_name from state where capital = \"salem\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "salem is the capital of which state", "output": "select state_name from state where capital = \"salem\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the capital salem", "output": "select state_name from state where capital = \"salem\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers flow through the state with the largest population", "output": "select river_name from river where traverse in ( select state_name from state where population = ( select max ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state that borders the state with the highest population", "output": "select state_name from state where area = ( select max ( area ) from state where state_name in ( select state_name from border_info where border in ( select state_name from state where population = ( select max ( population ) from state ) ) ) ) and state_name in ( select state_name from border_info where border in ( select state_name from state where population = ( select max ( population ) from state ) ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers are there in us", "output": "select count ( river_name ) from river;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name the 50 capitals in the usa", "output": "select distinct capital from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states have a city named springfield", "output": "select count ( state_name ) from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states have a city called springfield", "output": "select count ( state_name ) from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states have cities named springfield", "output": "select count ( state_name ) from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states have cities or towns named springfield", "output": "select count ( state_name ) from city where city_name = \"springfield\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state borders the state with the smallest population", "output": "select border from border_info where state_name in ( select state_name from state where population = ( select min ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the lakes in states bordering texas", "output": "select lake_name from lake where state_name in ( select border from border_info where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many major cities are in texas", "output": "select count ( city_name ) from city where population > 150000 and state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many big cities are in texas", "output": "select count ( city_name ) from city where population > 150000 and state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many major cities are there in texas", "output": "select count ( city_name ) from city where population > 150000 and state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how high are the highest points of all the states", "output": "select highest_elevation from highlow;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states does the missouri run through", "output": "select count ( traverse ) from river where river_name = \"missouri\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states does the missouri river flow through", "output": "select count ( traverse ) from river where river_name = \"missouri\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states does the missouri river run through", "output": "select count ( traverse ) from river where river_name = \"missouri\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in the smallest state in the usa", "output": "select river_name from river where length = ( select max ( length ) from river where traverse in ( select state_name from state where area = ( select min ( area ) from state ) ) ) and traverse in ( select state_name from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the average population per square km in pennsylvania", "output": "select population / area from state where state_name = \"pennsylvania\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border states that border states that border florida", "output": "select border from border_info where state_name in ( select border from border_info where state_name in ( select border from border_info where state_name = \"florida\" ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states border at least one other state", "output": "select count ( distinct state_name ) from border_info;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the height of the highest mountain in texas", "output": "select max ( distinct highest_elevation ) from highlow where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states border colorado and border new mexico", "output": "select count ( border ) from border_info where border in ( select border from border_info where state_name = \"new mexico\" ) and state_name = \"colorado\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many major cities are in states bordering nebraska", "output": "select count ( city_name ) from city where population > 150000 and state_name in ( select border from border_info where state_name = \"nebraska\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the total population of the states that border texas", "output": "select sum ( t2.population ) from state as t2 join border_info as t1 on t2.state_name = t1.border where t1.state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major lakes in united states", "output": "select lake_name from lake where area > 750;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "show me all the major lakes in the us", "output": "select lake_name from lake where area > 750;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "name all the lakes of us", "output": "select lake_name from lake;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many major rivers cross ohio", "output": "select count ( river_name ) from river where length > 750 and traverse = \"ohio\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the shortest river", "output": "select distinct traverse from river where length = ( select min ( distinct length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states are next to major rivers", "output": "select count ( distinct traverse ) from river where length > 750;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the height of mount mckinley", "output": "select mountain_altitude from mountain where mountain_name = \"mckinley\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states does the shortest river run through", "output": "select traverse from river where length = ( select min ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the state with the smallest population", "output": "select t2.highest_point from state as t1 join highlow as t2 on t1.state_name = t2.state_name where t1.state_name in ( select state_name from state where population = ( select min ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which rivers run through the state with the lowest elevation in the usa", "output": "select river_name from river where traverse in ( select state_name from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers run through the state with the lowest point in the usa", "output": "select river_name from river where traverse in ( select state_name from highlow where lowest_elevation = ( select min ( lowest_elevation ) from highlow ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what mountains are in alaska", "output": "select mountain_name from mountain where state_name = \"alaska\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states have major rivers", "output": "select count ( traverse ) from river where length > 750;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the smallest state through which the longest river runs", "output": "select state_name from state where area = ( select min ( area ) from state where state_name in ( select traverse from river where length = ( select max ( length ) from river ) ) ) and state_name in ( select traverse from river where length = ( select max ( length ) from river ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state traversed by the rio grande river", "output": "select state_name from state where area = ( select max ( area ) from state where state_name in ( select traverse from river where river_name = \"rio grande\" ) ) and state_name in ( select traverse from river where river_name = \"rio grande\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest of the state that the rio grande runs through", "output": "select state_name from state where area = ( select max ( area ) from state where state_name in ( select traverse from river where river_name = \"rio grande\" ) ) and state_name in ( select traverse from river where river_name = \"rio grande\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers run through the states bordering colorado", "output": "select count ( river_name ) from river where traverse in ( select border from border_info where state_name = \"colorado\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has no rivers", "output": "select state_name from state where state_name not in ( select traverse from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the largest state", "output": "select capital from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital city of the largest state in the us", "output": "select capital from state where area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities are in texas", "output": "select count ( city_name ) from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities does texas have", "output": "select count ( city_name ) from city where state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of the states", "output": "select area from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states in the us does the shortest river run through", "output": "select count ( distinct traverse ) from river where length = ( select min ( distinct length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers flow through states that border the state with the largest population", "output": "select river_name from river where traverse in ( select border from border_info where state_name in ( select state_name from state where population = ( select max ( population ) from state ) ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities in the largest state", "output": "select city_name from city where population > 150000 and state_name = ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of the smallest state", "output": "select area from state where area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states border the longest river in the usa", "output": "select border from border_info where state_name in ( select traverse from river where length = ( select max ( length ) from river ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population density of the state with the smallest population", "output": "select density from state where population = ( select min ( population ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states border the mississippi river", "output": "select count ( distinct border ) from border_info where state_name in ( select traverse from river where river_name = \"mississippi\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states have a capital that is the highest point in the state", "output": "select t1.state_name from state as t1 join highlow as t2 on t1.capital = t2.highest_point;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the capital of the smallest state", "output": "select population from city where city_name = ( select capital from state where area = ( select min ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population of the capital of the largest state", "output": "select population from city where city_name = ( select capital from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the lowest point of the state with the largest area", "output": "select t2.lowest_point from state as t1 join highlow as t2 on t1.state_name = t2.state_name where t1.state_name in ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border states that border the state with the largest population", "output": "select t1.border from border_info as t2 join border_info as t1 on t2.border = t1.state_name where t2.state_name in ( select state_name from state where population = ( select max ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the size of the largest state in the usa", "output": "select max ( area ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the area of the largest state", "output": "select max ( area ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which capitals are not major cities", "output": "select t2.capital from state as t2 join city as t1 on t2.capital = t1.city_name where t1.population <= 150000;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "give me the cities in usa", "output": "select city_name from city;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point of the state with the largest area", "output": "select t2.highest_point from state as t1 join highlow as t2 on t1.state_name = t2.state_name where t1.state_name in ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "where is massachusetts", "output": "select country_name from state where state_name = \"massachusetts\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what state has the largest urban population", "output": "select state_name from city group by state_name order by sum ( population ) desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major rivers in the us", "output": "select river_name from river;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many cities named austin are there in the usa", "output": "select count ( city_name ) from city where city_name = \"austin\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many people live in the smallest state bordering wyoming", "output": "select population from state where population = ( select max ( population ) from state where state_name in ( select border from border_info where state_name = \"wyoming\" ) ) and state_name in ( select border from border_info where state_name = \"wyoming\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the length of the colorado river in texas", "output": "select length from river where river_name = \"colorado\" and traverse = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the population density in the state with capital austin", "output": "select density from state where capital = \"austin\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how long is the shortest river in the usa", "output": "select length from river where length = ( select min ( length ) from river );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the elevation of death valley", "output": "select lowest_elevation from highlow where lowest_point = \"death valley\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the average population of the us by state", "output": "select avg ( population ) from state;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what rivers flow through the largest state", "output": "select river_name from river where traverse in ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what states border states that border states that border states that border texas", "output": "select t1.border from border_info as t2 join border_info as t1 on t2.border = t1.state_name join border_info as t3 on t3.border = t2.state_name join border_info as t4 on t4.border = t3.state_name where t4.state_name = \"texas\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states border on the state whose capital is boston", "output": "select count ( border ) from border_info where state_name = ( select state_name from state where capital = \"boston\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what are the major cities in the states through which the major river in virginia runs", "output": "select city_name from city where population > 150000 and state_name in ( select traverse from river where river_name in ( select river_name from river where length > 750 and traverse = \"virginia\" ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which states does not border texas", "output": "select state_name from state where state_name not in ( select border from border_info where state_name = \"texas\" );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many states border the largest state", "output": "select count ( border ) from border_info where state_name = ( select state_name from state where area = ( select max ( area ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "which state is the largest city in montana in", "output": "select state_name from city where population = ( select max ( population ) from city where state_name = \"montana\" ) and state_name = \"montana\";"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is capital of the state with the lowest point", "output": "select t1.capital from highlow as t2 join state as t1 on t1.state_name = t2.state_name where t2.lowest_elevation = ( select min ( lowest_elevation ) from highlow ) ;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the biggest american city in a state with a river", "output": "select distinct t1.city_name from city as t1 join river as t2 on t2.traverse = t1.state_name where t1.population = ( select max ( t1.population ) from river as t2 join city as t1 on t2.traverse = t1.state_name );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers are in the state with the largest population", "output": "select count ( t2.river_name ) from river as t2 join state as t1 on t1.state_name = t2.traverse where t1.state_name = ( select state_name from state where population = ( select max ( population ) from state ) );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the largest state that borders the state with the lowest point in the usa", "output": "select t1.state_name from highlow as t3 join border_info as t1 on t3.state_name = t1.border join state as t2 on t2.state_name = t1.border where t3.lowest_elevation = ( select min ( lowest_elevation ) from highlow ) order by t2.area desc limit 1;"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state with the highest point", "output": "select t1.capital from highlow as t2 join state as t1 on t1.state_name = t2.state_name where t2.highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the capital of the state with the highest elevation", "output": "select t1.capital from highlow as t2 join state as t1 on t1.state_name = t2.state_name where t2.highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the highest point in the smallest state", "output": "select t2.highest_point from highlow as t2 join state as t1 on t1.state_name = t2.state_name where t1.area = ( select min ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how many rivers are in the state with the highest point.", "output": "select count ( t1.river_name ) from highlow as t2 join river as t1 on t1.traverse = t2.state_name where t2.highest_elevation = ( select max ( highest_elevation ) from highlow );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "how high is the highest point in the largest state", "output": "select t2.highest_elevation from highlow as t2 join state as t1 on t1.state_name = t2.state_name where t1.area = ( select max ( area ) from state );"}, {"instruction": "geo contains tables such as state, city, border_info, highlow, lake, mountain, river. Table state has columns such as state_name, population, area, country_name, capital, density. state_name is the primary key. Table city has columns such as city_name, population, country_name, state_name. city_name is the primary key. Table border_info has columns such as state_name, border. border is the primary key. Table highlow has columns such as state_name, highest_elevation, lowest_point, highest_point, lowest_elevation. state_name is the primary key. Table lake has columns such as lake_name, area, country_name, state_name. is the primary key. Table mountain has columns such as mountain_name, mountain_altitude, country_name, state_name. mountain_name is the primary key. Table river has columns such as river_name, length, country_name, traverse. river_name is the primary key. The state_name of city is the foreign key of state_name of state. The border of border_info is the foreign key of state_name of state. The state_name of border_info is the foreign key of state_name of state. The state_name of highlow is the foreign key of state_name of state. The state_name of mountain is the foreign key of state_name of state. The traverse of river is the foreign key of state_name of state.", "input": "what is the longest river in the state with the highest point", "output": "select t1.river_name from highlow as t2 join river as t1 on t1.traverse = t2.state_name where t2.highest_elevation = ( select max ( highest_elevation ) from highlow ) order by t1.length desc limit 1;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers that are coauthored by Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers written by Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what are the papers that have Peter Mertens and Dina Barbian as co-authors", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers have Peter Mertens and Dina Barbian written ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what paper did Peter Mertens and Dina Barbian write together ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Has Peter Mertens and Dina Barbian written a paper together ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers by Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by authors Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were written by authors Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers written by authors Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When did Peter Mertens and Dina Barbian collaborate ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what are the collaborations of Peter Mertens and Dina Barbian ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Have Peter Mertens and Dina Barbian written a paper together ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Peter Mertens and Dina Barbian as co-authors", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Does Peter Mertens ever collaborated with Dina Barbian ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which papers have Peter Mertens and Dina Barbian as co-authors ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers coauthored by Peter Mertens and Dina Barbian", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers have been written by Peter Mertens and Dina Barbian ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers have been written by both Peter Mertens and Dina Barbian ?", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers have been written by Peter Mertens and Dina Barbian .", "output": "select distinct t3.paperid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Peter Mertens\" and t1.authorname = \"Dina Barbian\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who has written the most syntactic parsing papers ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who is the most published author in syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who has the most publications in syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who has written the most papers on syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List prominent scholars in syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who wrote the most papers on syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who are the authors with the most published papers in syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "top syntactic parsing author", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "top author in syntactic parsing", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published the most in syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published the most papers in syntactic parsing ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"syntactic parsing\" group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many citation noah a smith has ?", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "noah a smith citation count", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many citations does noah a smith have ?", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many citations does noah a smith have ?", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "number of citations of noah a smith", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many citations does noah a smith have", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many times was noah a smith cited ?", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many citations does noah a smith has ?", "output": "select distinct count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"noah a smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "chi papers", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers at chi", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers in chi", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "chi", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers about chi", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Show me chi papers .", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers did chi publish ?", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "list papers published in chi", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers on chi", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Has mirella lapata written any papers in 2016 ?", "output": "select distinct count ( t3.paperid ), t2.authorid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"mirella lapata\" and t3.year = 2016 group by t2.authorid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers has sharon goldwater written ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers has written by sharon goldwater ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by sharon goldwater", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what did sharon goldwater write ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers where sharon goldwater is an author", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers authored by sharon goldwater", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "sharon goldwater papers", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers by sharon goldwater", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers written by sharon goldwater", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which papers has sharon goldwater written ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers written by sharon goldwater", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What has sharon goldwater published ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Does sharon goldwater have any papers published ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "sharon goldwater 's papers", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "show me papers by sharon goldwater .", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers are authored by sharon goldwater ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by sharon goldwater ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"sharon goldwater\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What was oren etzioni 's latest paper ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"oren etzioni\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Latest paper by oren etzioni", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"oren etzioni\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the latest paper by oren etzioni ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"oren etzioni\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is oren etzioni 's latest paper ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"oren etzioni\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are the latest papers by oren etzioni ?", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"oren etzioni\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most recent papers by oren etzioni", "output": "select distinct t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"oren etzioni\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "are there any monte carlo simulation papers since 2011 ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"monte carlo simulation\" and t3.year > 2011;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "monte carlo simulation papers later than 2011", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"monte carlo simulation\" and t3.year > 2011;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "monte carlo simulation later than 2011", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"monte carlo simulation\" and t3.year > 2011;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "monte carlo simulation papers published after 2011", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"monte carlo simulation\" and t3.year > 2011;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "monte carlo simulation papers since 2011", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"monte carlo simulation\" and t3.year > 2011;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "does ras bodik publish a lot ?", "output": "select count ( t3.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"ras bodik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers did David M. Blei publish at AISTATS ?", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does David M. Blei have in AISTATS ?", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers has David M. Blei published in AISTATS ?", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers does David M. Blei have at AISTATS", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers does David M. Blei have in AISTATS ?", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many David M. Blei papers are in AISTATS ?", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers David M. Blei has in AISTATS ?", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does David M. Blei have in AISTATS", "output": "select distinct count ( t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"David m. Blei\" and t4.venuename = \"AISTATS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List all academic papers on machine networks for one shot learning", "output": "select distinct paperid from paper where title = \"machine networks for one shot learning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "machine networks for one shot learning", "output": "select distinct paperid from paper where title = \"machine networks for one shot learning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which EMNLP 2010 papers have the most citations ?", "output": "select distinct t3.citedpaperid, count ( t3.citedpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2010 and t2.venuename = \"EMNLP\" group by t3.citedpaperid order by count ( t3.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which paper from EMNLP 2010 was cited most ?", "output": "select distinct t3.citedpaperid, count ( t3.citedpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2010 and t2.venuename = \"EMNLP\" group by t3.citedpaperid order by count ( t3.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most cited EMNLP 2010 papers", "output": "select distinct t3.citedpaperid, count ( t3.citedpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2010 and t2.venuename = \"EMNLP\" group by t3.citedpaperid order by count ( t3.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which EMNLP 2010 papers have been cited the most ?", "output": "select distinct t3.citedpaperid, count ( t3.citedpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2010 and t2.venuename = \"EMNLP\" group by t3.citedpaperid order by count ( t3.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were published at CVPR in 2016 about Class consistent multi-modal fusion with binary features applied to RGB-D Object Dataset ?", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.datasetname = \"RGB-d object Dataset\" and t3.title = \"Class consistent multi-modal fusion with binary features\" and t3.year = 2016 and t4.venuename = \"CVPR\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were published at CVPR '16 about Class consistent multi-modal fusion with binary features applied to RGB-D Object Dataset ?", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.datasetname = \"RGB-d object Dataset\" and t3.title = \"Class consistent multi-modal fusion with binary features\" and t3.year = 2016 and t4.venuename = \"CVPR\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers are in deep learning ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers are about deep learning ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers about deep learning ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers are related to deep learning ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers has Christopher D. Manning written ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does Christopher D. Manning have ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers has Christopher D. Manning ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers has Christopher D. Manning published ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers has Christopher D. Manning written ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Has Christopher D. Manning published any papers ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers has Christopher D. Manning published ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers does Christopher D. Manning have ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many paper does Christopher D. Manning have ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many publications does Christopher D. Manning have ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does Christopher D. Manning have", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "number of papers written by Christopher D. Manning", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Christopher d. Manning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what kind of papers does Luke Zettlemoyer publish", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Keyphrases used by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What keywords are in papers by Luke Zettlemoyer ?", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keywords used by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what keywords are used by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keyphrases used by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keyphrases by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "give me the keywords used by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What topic does Luke Zettlemoyer write about ?", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what topics does Luke Zettlemoyer publish in", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keywords in the papers written by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keyphrases used by Luke Zettlemoyer .", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "topics used by Luke Zettlemoyer", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Luke Zettlemoyer\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What conference does Daniella Coelho publish in ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Daniella Coelho\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "conferences that Daniella Coelho has published in", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Daniella Coelho\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "In which conferences does Daniella Coelho typically publish ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Daniella Coelho\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "in what conferences does Daniella Coelho publish ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Daniella Coelho\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What conferences does Daniella Coelho publish in ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Daniella Coelho\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "At which conferences does Daniella Coelho publish ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Daniella Coelho\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What conferences does Daniella Coelho submit to ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Daniella Coelho\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers are there ?", "output": "select distinct count ( distinct paperid ) from paper;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers by Ed Desmond contain the keyphrases Semantic Parsing ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t1 join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t1.paperid join author as t2 on t3.authorid = t2.authorid where t2.authorname = \"Ed Desmond\" and t4.keyphrasename = \"Semantic Parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does Ed Desmond have in Semantic Parsing area ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t1 join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t1.paperid join author as t2 on t3.authorid = t2.authorid where t2.authorname = \"Ed Desmond\" and t4.keyphrasename = \"Semantic Parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many Semantic Parsing papers has Ed Desmond written ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t1 join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t1.paperid join author as t2 on t3.authorid = t2.authorid where t2.authorname = \"Ed Desmond\" and t4.keyphrasename = \"Semantic Parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many paper has Ed Desmond written about Semantic Parsing ?", "output": "select distinct count ( distinct t3.paperid ) from paperkeyphrase as t1 join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t1.paperid join author as t2 on t3.authorid = t2.authorid where t2.authorname = \"Ed Desmond\" and t4.keyphrasename = \"Semantic Parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What conferences did li dong submit to in 2016 ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"li dong\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Where did li dong publish in 2016", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"li dong\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What conferences did li dong publish in in 2016 ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"li dong\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Where did li dong publish in 2016 ?", "output": "select distinct t3.venueid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"li dong\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "acl papers in 2012 on Parsing", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were published in acl in 2012 about Parsing ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers on Parsing appeared at acl last year", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Parsing papers from acl 2012", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers about Parsing in acl 2012", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "acl papers in 2012 in Parsing", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "acl papers in 2012 about Parsing", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were published at acl in 2012 were about Parsing ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers on Parsing appeared at acl in 2012", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many Parsing papers did acl 2012 have ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published Parsing papers at acl 2012", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which papers in acl 2012 had Parsing in them ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what were some Parsing based papers in acl 2012 ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Parsing\" and t3.year = 2012 and t4.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List the popular publications on dependent types", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"dependent types\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which paper should I read about dependent types ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"dependent types\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "top dependent types papers", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"dependent types\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List papers that has a keyword Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Question Answering research papers", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers on Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers related to Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers about Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers about Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers published in the area of Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Question Answering experiments", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Show me the papers on Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers that used Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers that mention Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Question Answering papers", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Show me Question Answering papers .", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Question Answering publications", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Fetch me some papers on Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers on Question Answering experiments", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers talk about Question Answering ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the paper about Question Answering ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which papers are about about Question Answering ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "list papers that used Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers for Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List papers that has keyword Question Answering", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers with Question Answering in keyphrases", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Question Answering\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keyphrases used by Luke S Zettlemoyer for each year", "output": "select distinct t2.keyphraseid, t3.year from paper as t3 join paperkeyphrase as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Luke s Zettlemoyer\" order by t3.year, t2.keyphraseid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "recent research interests of sanjeev arora", "output": "select distinct t1.keyphrasename, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"sanjeev arora\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "recent papers by sanjeev arora", "output": "select distinct t1.keyphrasename, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"sanjeev arora\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "recent papers written by sanjeev arora", "output": "select distinct t1.keyphrasename, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"sanjeev arora\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "list papers published by balakrishnan prabhakaran", "output": "select distinct t3.paperid, t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"balakrishnan prabhakaran\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "citation count of zachary tatlock 's papers", "output": "select distinct t3.paperid, t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"zachary tatlock\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "subhasis chaudhuri", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"subhasis chaudhuri\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "list papers by subhasis chaudhuri", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"subhasis chaudhuri\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List of papers by subhasis chaudhuri", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"subhasis chaudhuri\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "conference papers of subhasis chaudhuri", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"subhasis chaudhuri\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many parsing papers in ACL 2014", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"parsing\" and t3.year = 2014 and t4.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many parsing papers appeared in the proceeeding of ACL 2014 ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"parsing\" and t3.year = 2014 and t4.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many parsing papers were published at ACL 2014 ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"parsing\" and t3.year = 2014 and t4.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "brian curless convolution paper", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "convolution by brian curless", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by brian curless about convolution", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "brian curless 's paper about convolution", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are the papers of brian curless in convolution ?", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers brian curless wrote about convolution", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "brian curless 's papers on convolution", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the paper about convolution from brian curless ?", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by brian curless in convolution topic", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "I want the papers on keyphrase0 by brian curless", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "convolution papers by brian curless", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers has brian curless written on convolution ?", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers has brian curless written about convolution ?", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "convolution paper by brian curless", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Does brian curless do convolution ?", "output": "select distinct t1.authorid, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"brian curless\" and t5.keyphrasename = \"convolution\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers has Liwen Xiong written in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by Liwen Xiong in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What did Liwen Xiong published in 2015 ?", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers written by Liwen Xiong in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are the papers of Liwen Xiong in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by Liwen Xiong from 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers published in 2015 by Liwen Xiong", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what has Liwen Xiong done in the past year", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers did Liwen Xiong publish last year ?", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers published in 2015 by Liwen Xiong", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Liwen Xiong 's papers in 2015 ?", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Liwen Xiong 's papers in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Liwen Xiong publication 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers authored by Liwen Xiong in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers from Liwen Xiong in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers are published by Liwen Xiong in 2015", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Liwen Xiong\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What TAIL paper published in NIPS ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List the papers on TAIL that were published in NIPS", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what are the papers in NIPS about TAIL ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers about TAIL in NIPS", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers at NIPS related to TAIL", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers about TAIL published at NIPS", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "TAIL papers in NIPS", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers on TAIL NIPS", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "TAIL papers used in NIPS", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"TAIL\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many co-authors has Mark Steedman had ?", "output": "select distinct count ( distinct t1.authorid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname != \"Mark Steedman\" and t2.paperid in ( select t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Mark Steedman\" );"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keyphrases used by Christof Dallermassl in 2000", "output": "select distinct t2.keyphraseid from paper as t3 join paperkeyphrase as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Christof Dallermassl\" and t3.year = 2000;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Keyphrases used by Christof Dallermassl in 2000", "output": "select distinct t2.keyphraseid from paper as t3 join paperkeyphrase as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Christof Dallermassl\" and t3.year = 2000;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keyphrases Christof Dallermassl used in papers written last year", "output": "select distinct t2.keyphraseid from paper as t3 join paperkeyphrase as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Christof Dallermassl\" and t3.year = 2000;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are keyphrases by Christof Dallermassl in 2000 ?", "output": "select distinct t2.keyphraseid from paper as t3 join paperkeyphrase as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Christof Dallermassl\" and t3.year = 2000;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what author is most cited ?", "output": "select distinct t1.authorname, count ( t3.citingpaperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join cite as t3 on t2.paperid = t3.citedpaperid group by t1.authorname order by count ( t3.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "journal articles by mohammad rastegari", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"mohammad rastegari\" and t3.journalid >= 0;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Journal Papers by mohammad rastegari", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"mohammad rastegari\" and t3.journalid >= 0;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "best paper in TACL 2014 ?", "output": "select distinct count ( distinct t3.citingpaperid ), t1.paperid from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2014 and t2.venuename = \"TACL\" group by t1.paperid order by count ( distinct t3.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What was the best paper at TACL 2014 ?", "output": "select distinct count ( distinct t3.citingpaperid ), t1.paperid from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2014 and t2.venuename = \"TACL\" group by t1.paperid order by count ( distinct t3.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published at acl 2016 ?", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2016 and t3.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "acl 2016 authors", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2016 and t3.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "authors of acl 2016 papers", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2016 and t3.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List of authors acl 2016", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2016 and t3.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "author published acl 2016", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2016 and t3.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who had papers at acl 2016 ?", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2016 and t3.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List of authors in acl 2016", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2016 and t3.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were written on Multiuser Receiver in the Decision Feedback this year ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Multiuser receiver in the decision Feedback\" and t3.year = 2016 group by t3.paperid having count ( distinct t1.keyphrasename ) > 1;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers run experiments on ImageNet ?", "output": "select distinct count ( distinct t3.paperid ) from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname like \"ImageNet\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers used ImageNet dataset ?", "output": "select distinct count ( distinct t3.paperid ) from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname like \"ImageNet\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers written on ImageNet ?", "output": "select distinct count ( distinct t3.paperid ) from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname like \"ImageNet\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers are based on ImageNet", "output": "select distinct count ( distinct t3.paperid ) from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname like \"ImageNet\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers use ImageNet ?", "output": "select distinct count ( distinct t3.paperid ) from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname like \"ImageNet\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers did Mirella Lapata cite ?", "output": "select distinct count ( t3.citedpaperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join cite as t3 on t2.paperid = t3.citingpaperid where t1.authorname = \"Mirella Lapata\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers does Mirella Lapata cite", "output": "select distinct count ( t3.citedpaperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join cite as t3 on t2.paperid = t3.citingpaperid where t1.authorname = \"Mirella Lapata\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers has Mirella Lapata cited ?", "output": "select distinct count ( t3.citedpaperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join cite as t3 on t2.paperid = t3.citingpaperid where t1.authorname = \"Mirella Lapata\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When does Michael Stonebraker publish the first VLDB paper ?", "output": "select distinct t3.year from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Michael Stonebraker\" and t4.venuename = \"VLDB\" order by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "semantic parsing dataset", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "data sets for semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "list datasets for semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets for semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Datasets with semantic parsing information", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets used by semantic parsing papers", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets in semantic parsing papers", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "semantic parsing datasets", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets in papers about semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets used for semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "large-scale datasets used in semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets with semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets used for evaluating semantic parsing", "output": "select distinct t2.datasetid from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join keyphrase as t4 on t1.keyphraseid = t4.keyphraseid where t4.keyphrasename = \"semantic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "where does Peter Mertens publish ?", "output": "select distinct t3.journalid, t4.venueid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Peter Mertens\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "in what venues does Peter Mertens publish ?", "output": "select distinct t3.journalid, t4.venueid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Peter Mertens\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Where does Peter Mertens publish ?", "output": "select distinct t3.journalid, t4.venueid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Peter Mertens\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers appeared at nature communications last year", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were at nature communications 2015 ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers accepted in nature communications 2015", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were published in nature communications in 2015 ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers on nature communications in 2015 ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers in nature communications 2015", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were accepted at nature communications 2015 ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers are presented in nature communications 2015 ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers published in nature communications in 2015 ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers published in nature communications 2015 ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were published in nature communications 2015 conference ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers was published in nature communications in 2015", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"nature communications\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what was the first deep learning paper ?", "output": "select distinct t2.datasetid, t4.year from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join paper as t4 on t4.paperid = t3.paperid join keyphrase as t5 on t1.keyphraseid = t5.keyphraseid where t5.keyphrasename = \"deep learning\" order by t4.year asc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what year was the first deep learning paper published ?", "output": "select distinct t2.datasetid, t4.year from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paperkeyphrase as t1 on t1.paperid = t3.paperid join paper as t4 on t4.paperid = t3.paperid join keyphrase as t5 on t1.keyphraseid = t5.keyphraseid where t5.keyphrasename = \"deep learning\" order by t4.year asc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets mentioned at ACL", "output": "select distinct t1.datasetid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t4.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what datasets do papers at ACL use most ?", "output": "select distinct t1.datasetid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t4.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "the papers on semantic parsing by li dong at acl in 2016", "output": "select distinct t2.paperid from paperkeyphrase as t5 join keyphrase as t3 on t5.keyphraseid = t3.keyphraseid join paper as t2 on t2.paperid = t5.paperid join venue as t6 on t6.venueid = t2.venueid join writes as t4 on t4.paperid = t2.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"li dong\" and t3.keyphrasename = \"semantic parsing\" and t2.year = 2016 and t6.venuename = \"acl\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were written on convolutional neural networks in the past year ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"convolutional neural networks\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were published on convolutional neural networks in 2016 ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"convolutional neural networks\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were written on convolutional neural networks in 2016 ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"convolutional neural networks\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were written on the convolutional neural networks this year ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"convolutional neural networks\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers on convolutional neural networks have been published in the past year ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"convolutional neural networks\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were written on question answering this year ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"question answering\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which year had the most NIPS papers ?", "output": "select distinct count ( t1.paperid ), t1.year from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"NIPS\" group by t1.year order by count ( t1.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what year had the most NIPS papers ?", "output": "select distinct count ( t1.paperid ), t1.year from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"NIPS\" group by t1.year order by count ( t1.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what year had the most number of NIPS papers ?", "output": "select distinct count ( t1.paperid ), t1.year from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"NIPS\" group by t1.year order by count ( t1.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "when were most NIPS papers published ?", "output": "select distinct count ( t1.paperid ), t1.year from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"NIPS\" group by t1.year order by count ( t1.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who writes papers with Noah A Smith ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who is a coauthor with Noah A Smith ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who are Noah A Smith 's co-authors", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who has coauthored with Noah A Smith ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "co-authors of Noah A Smith", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "author who wrote papers with Noah A Smith", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "authors who collaborated with Noah A Smith", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who does Noah A Smith author with ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who are Noah A Smith 's coauthors", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who are all the co-authors of Noah A Smith ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who does Noah A Smith work with ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who does Noah A Smith collaborate with ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who are Noah A Smith 's coauthors ?", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "coauthors of Noah A Smith", "output": "select distinct t1.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Noah a Smith\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what datasets did jitendra malik use ?", "output": "select distinct t2.datasetid from paper as t3 join paperdataset as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"jitendra malik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what datasets are used in papers by jitendra malik", "output": "select distinct t2.datasetid from paper as t3 join paperdataset as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"jitendra malik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what datasets did jitendra malik use in his papers ?", "output": "select distinct t2.datasetid from paper as t3 join paperdataset as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"jitendra malik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what datasets were used by jitendra malik ?", "output": "select distinct t2.datasetid from paper as t3 join paperdataset as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"jitendra malik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "datasets used in papers written by jitendra malik ?", "output": "select distinct t2.datasetid from paper as t3 join paperdataset as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"jitendra malik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Datasets by jitendra malik", "output": "select distinct t2.datasetid from paper as t3 join paperdataset as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"jitendra malik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What datasets have jitendra malik used", "output": "select distinct t2.datasetid from paper as t3 join paperdataset as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"jitendra malik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "recent deep learning papers", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "new deep learning papers", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are the latest publications on deep learning ?", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Most recent deep learning conference ?", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Show me some recent papers on deep learning ?", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are some recent papers written in deep learning ?", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the most recent paper of deep learning ?", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are recent papers on deep learning ?", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Current research on deep learning", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "latest deep learning papers", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "newest deep learning papers", "output": "select distinct t3.paperid, t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What years did Pedro Domingos publish papers in ?", "output": "select distinct t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Pedro Domingos\" group by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "In what years did Pedro Domingos publish a paper ?", "output": "select distinct t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Pedro Domingos\" group by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "jamie callan 's publications by year", "output": "select distinct t3.paperid, t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"jamie callan\" order by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does jamie callan publish each year ?", "output": "select distinct count ( t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"jamie callan\" group by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "number of papers by year from jamie callan", "output": "select distinct count ( t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"jamie callan\" group by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers jamie callan published each year ?", "output": "select distinct count ( t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"jamie callan\" group by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who does oren etzioni cite", "output": "select distinct t3.paperid from paper as t3 join cite as t4 on t3.paperid = t4.citingpaperid join writes as t2 on t2.paperid = t4.citedpaperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"oren etzioni\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers does oren etzioni cite", "output": "select distinct t3.paperid from paper as t3 join cite as t4 on t3.paperid = t4.citingpaperid join writes as t2 on t2.paperid = t4.citedpaperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"oren etzioni\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers citing Daniel Jurafsky", "output": "select distinct t3.paperid from paper as t3 join cite as t4 on t3.paperid = t4.citingpaperid join writes as t2 on t2.paperid = t4.citedpaperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Daniel Jurafsky\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers cite Daniel Jurafsky ?", "output": "select distinct t3.paperid from paper as t3 join cite as t4 on t3.paperid = t4.citingpaperid join writes as t2 on t2.paperid = t4.citedpaperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Daniel Jurafsky\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which papers cite Daniel Jurafsky ?", "output": "select distinct t3.paperid from paper as t3 join cite as t4 on t3.paperid = t4.citingpaperid join writes as t2 on t2.paperid = t4.citedpaperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Daniel Jurafsky\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "citations for Daniel Jurafsky", "output": "select distinct t3.paperid from paper as t3 join cite as t4 on t3.paperid = t4.citingpaperid join writes as t2 on t2.paperid = t4.citedpaperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Daniel Jurafsky\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "journal papers for instance segmentation", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"instance segmentation\" and t3.journalid >= 0;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who has the most papers in semantic parsing after 2005 ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"semantic parsing\" and t4.year > 2005 group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who has written the most papers on semantic parsing since 2005 ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"semantic parsing\" and t4.year > 2005 group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published the most in semantic parsing after 2005 ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"semantic parsing\" and t4.year > 2005 group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many citations does Dan Makumbi 's Genetic Identity paper have ?", "output": "select distinct count ( t5.citingpaperid ) from paperkeyphrase as t2 join keyphrase as t3 on t2.keyphraseid = t3.keyphraseid join writes as t4 on t4.paperid = t2.paperid join cite as t5 on t4.paperid = t5.citedpaperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Dan Makumbi\" and t3.keyphrasename = \"Genetic Identity\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "character recognition papers earlier than 2010", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"character recognition\" and t3.year < 2010;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers before 2010 about character recognition", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"character recognition\" and t3.year < 2010;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "character recognition papers from before 2010", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"character recognition\" and t3.year < 2010;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers about character recognition from before 2010", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"character recognition\" and t3.year < 2010;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "character recognition papers before 2010", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"character recognition\" and t3.year < 2010;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what topics does oren etzioni write about most ?", "output": "select distinct count ( t2.keyphraseid ), t2.keyphraseid from paper as t3 join paperkeyphrase as t2 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"oren etzioni\" group by t2.keyphraseid order by count ( t2.keyphraseid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers related to deep learning cited the dataset ImageNet ?", "output": "select distinct count ( t4.paperid ) from paperdataset as t3 join dataset as t2 on t3.datasetid = t2.datasetid join paper as t4 on t4.paperid = t3.paperid join paperkeyphrase as t1 on t4.paperid = t1.paperid join keyphrase as t5 on t1.keyphraseid = t5.keyphraseid where t2.datasetname = \"ImageNet\" and t5.keyphrasename = \"deep learning\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most cited papers on parsing", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "parsing top papers", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List top papers for parsing", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "parsing papers that have the most citations", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the paper about parsing of the most citation ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Paper on parsing with most citations", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "parsing papers with most citations", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most cited parsing papers", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what are the parsing papers that have the most citations ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "highly cited parsing papers", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most cited papers for parsing", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Most cited papers on parsing", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"parsing\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What paper did Michael Armstrong wrote in the 90s ?", "output": "select distinct t3.year, t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname like \"Michael Armstrong\" and t3.year like \"199\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the most cited paper by ohad shamir ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ohad shamir\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the highest cited paper by ohad shamir ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ohad shamir\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the most cited paper of ohad shamir ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ohad shamir\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is ohad shamir 's highest cited paper ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ohad shamir\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What paper by ohad shamir has the most citation ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ohad shamir\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what is the most cited paper of ohad shamir ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ohad shamir\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what is ohad shamir 's most cited paper ?", "output": "select distinct t4.citedpaperid, count ( t4.citedpaperid ) from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ohad shamir\" group by t4.citedpaperid order by count ( t4.citedpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers did michael i. jordan publish in 2016 ?", "output": "select distinct count ( t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"michael i. jordan\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does michael i. jordan have in 2016 ?", "output": "select distinct count ( t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"michael i. jordan\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers did michael i. jordan publish in 2016", "output": "select distinct count ( t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"michael i. jordan\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "count of ACL papers by author", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"ACL\" group by t1.authorid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many ACL papers by author", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"ACL\" group by t1.authorid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "number of ACL papers by author", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"ACL\" group by t1.authorid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who wrote the most papers for CVPR 2007", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2007 and t3.venuename = \"CVPR\" group by t1.authorid order by count ( t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published papers in CVPR 2007", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2007 and t3.venuename = \"CVPR\" group by t1.authorid order by count ( t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who wrote the most CVPR papers in 2007", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2007 and t3.venuename = \"CVPR\" group by t1.authorid order by count ( t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most published author at CVPR 2007", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2007 and t3.venuename = \"CVPR\" group by t1.authorid order by count ( t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published the most papers in CVPR 2007", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2007 and t3.venuename = \"CVPR\" group by t1.authorid order by count ( t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who published the most papers in 2007 at CVPR ?", "output": "select distinct count ( t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2007 and t3.venuename = \"CVPR\" group by t1.authorid order by count ( t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers in ACL 2015 ?", "output": "select distinct count ( distinct t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "number of papers published in ACL 2015", "output": "select distinct count ( distinct t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers from 2014", "output": "select distinct paperid from paper where year = 2014;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "2014 papers", "output": "select distinct paperid from paper where year = 2014;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers does Richard Ladner have in chi ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what paper has Richard Ladner published in chi journal ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what paper has Richard Ladner published in chi ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers by Richard Ladner published at chi", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Does Richard Ladner publish in chi ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What has Richard Ladner published at chi ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers has Richard Ladner written at chi ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which paper did Richard Ladner present at chi ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Richard Ladner\" and t4.venuename = \"chi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the paper with the most citation about Artificial Intelligence ?", "output": "select distinct t4.citedpaperid, count ( t4.citingpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"Artificial Intelligence\" group by t4.citedpaperid order by count ( t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Fetch me the most cited publications for Artificial Intelligence", "output": "select distinct t4.citedpaperid, count ( t4.citingpaperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"Artificial Intelligence\" group by t4.citedpaperid order by count ( t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "topics at ACL 2014", "output": "select distinct count ( t3.paperid ), t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t3.year = 2014 and t4.venuename = \"ACL\" group by t1.keyphraseid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most common topics at NIPS 2015", "output": "select distinct count ( t3.paperid ), t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t3.year = 2015 and t4.venuename = \"NIPS\" group by t1.keyphraseid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "most popular topics at NIPS 2015", "output": "select distinct count ( t3.paperid ), t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t3.year = 2015 and t4.venuename = \"NIPS\" group by t1.keyphraseid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "hot topics at NIPS 2015", "output": "select distinct count ( t3.paperid ), t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t3.year = 2015 and t4.venuename = \"NIPS\" group by t1.keyphraseid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "popular topics at NIPS 2015", "output": "select distinct count ( t3.paperid ), t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t3.year = 2015 and t4.venuename = \"NIPS\" group by t1.keyphraseid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which topics were most popular at NIPS 2015", "output": "select distinct count ( t3.paperid ), t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t3.year = 2015 and t4.venuename = \"NIPS\" group by t1.keyphraseid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "topics popular at NIPS 2015", "output": "select distinct count ( t3.paperid ), t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t3.year = 2015 and t4.venuename = \"NIPS\" group by t1.keyphraseid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers related to deep reinforcement learning in nips ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"deep reinforcement learning\" and t4.venuename = \"nips\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers on WebKB", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which papers used WebKB ?", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers about WebKB", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List the papers that used WebKB dataset", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers using WebKB", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers that use WebKB", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "WebKB papers", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers that used WebKB", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers that use the WebKB dataset", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"WebKB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "conferences in 2013", "output": "select distinct venueid from paper where year = 2013;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how is the most cited author in CVPR ?", "output": "select distinct count ( distinct t4.citingpaperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid join cite as t4 on t1.paperid = t4.citedpaperid where t3.venuename = \"CVPR\" group by t1.authorid order by count ( distinct t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who is the most cited author at CVPR ?", "output": "select distinct count ( distinct t4.citingpaperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid join cite as t4 on t1.paperid = t4.citedpaperid where t3.venuename = \"CVPR\" group by t1.authorid order by count ( distinct t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what are some syntactic parsing papers that chris dyer did not write ?", "output": "select distinct t1.authorname, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname != \"chris dyer\" and t5.keyphrasename = \"syntactic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "are there any syntactic parsing papers not written by chris dyer ?", "output": "select distinct t1.authorname, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname != \"chris dyer\" and t5.keyphrasename = \"syntactic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what are syntactic parsing papers not written by chris dyer", "output": "select distinct t1.authorname, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname != \"chris dyer\" and t5.keyphrasename = \"syntactic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "syntactic parsing papers not written by chris dyer", "output": "select distinct t1.authorname, t3.paperid from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname != \"chris dyer\" and t5.keyphrasename = \"syntactic parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers published in the last year", "output": "select distinct paperid from paper where year = ( select max ( year ) from paper );"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When was benjamin mako hill 's first publication ?", "output": "select distinct count ( t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"benjamin mako hill\" group by t3.year order by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When was benjamin mako hill 's first paper written ?", "output": "select distinct count ( t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"benjamin mako hill\" group by t3.year order by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When did ameet soni publish ?", "output": "select distinct count ( t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"ameet soni\" group by t3.year order by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who cites Daniel A Reed the most", "output": "select distinct count ( t4.citingpaperid ), t3.authorid from writes as t2 join author as t1 on t2.authorid = t1.authorid join cite as t4 on t2.paperid = t4.citedpaperid join writes as t3 on t3.paperid = t4.citingpaperid where t1.authorname = \"Daniel a Reed\" group by t3.authorid order by count ( t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who cites Daniel A Reed most ?", "output": "select distinct count ( t4.citingpaperid ), t3.authorid from writes as t2 join author as t1 on t2.authorid = t1.authorid join cite as t4 on t2.paperid = t4.citedpaperid join writes as t3 on t3.paperid = t4.citingpaperid where t1.authorname = \"Daniel a Reed\" group by t3.authorid order by count ( t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers are in sigir ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"sigir\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers does sigir have ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"sigir\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers are published in sigir ?", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"sigir\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "number of papers in sigir conference", "output": "select distinct count ( t1.paperid ) from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t2.venuename = \"sigir\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers have fewer than 5 citations by ACL papers ?", "output": "select distinct t3.citingpaperid from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t2.venuename = \"ACL\" group by t3.citingpaperid having count ( distinct t3.citedpaperid ) < 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "ACL papers with less than 5 citations", "output": "select distinct t3.citingpaperid from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t2.venuename = \"ACL\" group by t3.citingpaperid having count ( distinct t3.citedpaperid ) < 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what ACL papers have less than 5 citations ?", "output": "select distinct t3.citingpaperid from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t2.venuename = \"ACL\" group by t3.citingpaperid having count ( distinct t3.citedpaperid ) < 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers have fewer than 5 citations by ACL papers", "output": "select distinct t3.citingpaperid from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t2.venuename = \"ACL\" group by t3.citingpaperid having count ( distinct t3.citedpaperid ) < 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are the 5 most recent papers of Mirella Lapata ?", "output": "select distinct t3.paperid, t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Mirella Lapata\" order by t3.year desc limit 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What were the papers published at pldi 2015 ?", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers from pldi 2015 conference", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers published at pldi 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are the papers from pldi 2015 ?", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Papers from pldi 2015 ?", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which papers were accepted in pldi 2015 ?", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were published during the conference pldi 2015 ?", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers in pldi 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List of papers in pldi 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "pldi papers in 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers are published in pldi 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers from pldi 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "pldi papers 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "pldi 2015 conference", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "pldi best paper award 2015", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "pldi 2015 list of papers", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.year = 2015 and t2.venuename = \"pldi\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List today 's journals", "output": "select distinct journalid from paper where year = 2011 group by journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List the journals published in March , 2011", "output": "select distinct journalid from paper where year = 2011 group by journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "ACL papers in 2016 with neural attention in the title", "output": "select distinct t1.paperid from venue as t2 join paper as t1 on t2.venueid = t1.venueid where t1.title like \"neural attention\" and t1.year = 2016 and t2.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who writes a lot of papers in Machine Learning ?", "output": "select distinct t1.authorname from paperkeyphrase as t2 join keyphrase as t4 on t2.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t2.paperid join author as t1 on t3.authorid = t1.authorid where t4.keyphrasename = \"Machine Learning\" group by t1.authorname order by count ( distinct t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who wrote sensor fusion ?", "output": "select distinct t1.authorname from paperkeyphrase as t2 join keyphrase as t4 on t2.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t2.paperid join author as t1 on t3.authorid = t1.authorid where t4.keyphrasename like \"sensor fusion\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Authors of papers on sensor fusion", "output": "select distinct t1.authorname from paperkeyphrase as t2 join keyphrase as t4 on t2.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t2.paperid join author as t1 on t3.authorid = t1.authorid where t4.keyphrasename like \"sensor fusion\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "people working on sensor fusion", "output": "select distinct t1.authorname from paperkeyphrase as t2 join keyphrase as t4 on t2.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t2.paperid join author as t1 on t3.authorid = t1.authorid where t4.keyphrasename like \"sensor fusion\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who publishes in sensor fusion ?", "output": "select distinct t1.authorname from paperkeyphrase as t2 join keyphrase as t4 on t2.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t2.paperid join author as t1 on t3.authorid = t1.authorid where t4.keyphrasename like \"sensor fusion\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who publishes papers about sensor fusion", "output": "select distinct t1.authorname from paperkeyphrase as t2 join keyphrase as t4 on t2.keyphraseid = t4.keyphraseid join writes as t3 on t3.paperid = t2.paperid join author as t1 on t3.authorid = t1.authorid where t4.keyphrasename like \"sensor fusion\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many papers by dan klein are cited by michael i. jordan", "output": "select distinct count ( t5.citingpaperid ) from writes as t3 join author as t2 on t3.authorid = t2.authorid join cite as t5 on t3.paperid = t5.citedpaperid join writes as t4 on t4.paperid = t5.citingpaperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"michael i. jordan\" and t1.authorname = \"dan klein\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many of dan klein 's papers cite michael i. jordan", "output": "select distinct count ( t5.citingpaperid ) from writes as t3 join author as t2 on t3.authorid = t2.authorid join cite as t5 on t3.paperid = t5.citedpaperid join writes as t4 on t4.paperid = t5.citingpaperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"michael i. jordan\" and t1.authorname = \"dan klein\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who else was on the paper with Ameet Soni and Ras Bodik ?", "output": "select distinct t5.authorid from writes as t3 join author as t2 on t3.authorid = t2.authorid join writes as t4 on t4.paperid = t3.paperid join writes as t5 on t5.paperid = t4.paperid join author as t1 on t4.authorid = t1.authorid where t2.authorname = \"Ameet Soni\" and t1.authorname = \"Ras Bodik\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "2014 papers using ImageNet", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"ImageNet\" and t3.year = 2014;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What journals are Takashi Matsumoto 's articles published in ?", "output": "select distinct t3.journalid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Takashi Matsumoto\" group by t3.journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What journals has Takashi Matsumoto published in ?", "output": "select distinct t3.journalid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Takashi Matsumoto\" group by t3.journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "In what scholarly journals does Takashi Matsumoto publish ?", "output": "select distinct t3.journalid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Takashi Matsumoto\" group by t3.journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What authors wrote papers about Bacterial Wilt in 2016 ?", "output": "select distinct t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid join author as t5 on t3.authorid = t5.authorid where t2.keyphrasename = \"Bacterial Wilt\" and t4.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who wrote on the topic of Bacterial Wilt in 2016 ?", "output": "select distinct t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid join author as t5 on t3.authorid = t5.authorid where t2.keyphrasename = \"Bacterial Wilt\" and t4.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When did Luke S Zettlemoyer publish ?", "output": "select distinct t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Luke s Zettlemoyer\" order by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "question answering 2016 papers", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"question answering\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What papers were written on question answering in 2016 ?", "output": "select distinct t3.paperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"question answering\" and t3.year = 2016;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what keyphrases get most citations ?", "output": "select distinct count ( t3.citingpaperid ), t1.keyphrasename from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join cite as t3 on t2.paperid = t3.citedpaperid group by t1.keyphrasename order by count ( t3.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Find journals about Temporal Data .", "output": "select distinct t3.journalid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Temporal Data\" group by t3.journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "List the journals related to Temporal Data", "output": "select distinct t3.journalid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Temporal Data\" group by t3.journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which ACL 2014 papers about Parsing used Jeopardy! Questions ?", "output": "select distinct t2.paperid from paperdataset as t3 join dataset as t5 on t3.datasetid = t5.datasetid join paperkeyphrase as t4 on t4.paperid = t3.paperid join paper as t2 on t2.paperid = t3.paperid join venue as t6 on t6.venueid = t2.venueid join keyphrase as t1 on t4.keyphraseid = t1.keyphraseid where t5.datasetname = \"Jeopardy! Questions\" and t1.keyphrasename = \"Parsing\" and t2.year = 2014 and t6.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Parsing papers using Jeopardy! Questions published at ACL 2014", "output": "select distinct t2.paperid from paperdataset as t3 join dataset as t5 on t3.datasetid = t5.datasetid join paperkeyphrase as t4 on t4.paperid = t3.paperid join paper as t2 on t2.paperid = t3.paperid join venue as t6 on t6.venueid = t2.venueid join keyphrase as t1 on t4.keyphraseid = t1.keyphraseid where t5.datasetname = \"Jeopardy! Questions\" and t1.keyphrasename = \"Parsing\" and t2.year = 2014 and t6.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Parsing papers from ACL 2014 using Jeopardy! Questions", "output": "select distinct t2.paperid from paperdataset as t3 join dataset as t5 on t3.datasetid = t5.datasetid join paperkeyphrase as t4 on t4.paperid = t3.paperid join paper as t2 on t2.paperid = t3.paperid join venue as t6 on t6.venueid = t2.venueid join keyphrase as t1 on t4.keyphraseid = t1.keyphraseid where t5.datasetname = \"Jeopardy! Questions\" and t1.keyphrasename = \"Parsing\" and t2.year = 2014 and t6.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Parsing papers from ACL 2014 that used Jeopardy! Questions", "output": "select distinct t2.paperid from paperdataset as t3 join dataset as t5 on t3.datasetid = t5.datasetid join paperkeyphrase as t4 on t4.paperid = t3.paperid join paper as t2 on t2.paperid = t3.paperid join venue as t6 on t6.venueid = t2.venueid join keyphrase as t1 on t4.keyphraseid = t1.keyphraseid where t5.datasetname = \"Jeopardy! Questions\" and t1.keyphrasename = \"Parsing\" and t2.year = 2014 and t6.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers about Parsing that used Jeopardy! Questions and were published at ACL 2014", "output": "select distinct t2.paperid from paperdataset as t3 join dataset as t5 on t3.datasetid = t5.datasetid join paperkeyphrase as t4 on t4.paperid = t3.paperid join paper as t2 on t2.paperid = t3.paperid join venue as t6 on t6.venueid = t2.venueid join keyphrase as t1 on t4.keyphraseid = t1.keyphraseid where t5.datasetname = \"Jeopardy! Questions\" and t1.keyphrasename = \"Parsing\" and t2.year = 2014 and t6.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "in what journals does linda shapiro publish ?", "output": "select distinct t2.journalid from paper as t3 join journal as t2 on t3.journalid = t2.journalid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"linda shapiro\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which journals did linda shapiro submit papers to ?", "output": "select distinct t2.journalid from paper as t3 join journal as t2 on t3.journalid = t2.journalid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"linda shapiro\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "NIPS authors", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who are the authors at NIPS ?", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who authored papers at NIPS ?", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who publishes in NIPS ?", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who has papers at NIPS ?", "output": "select distinct t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which venue publishes the most papers about deep learning", "output": "select distinct count ( t3.paperid ), t4.venueid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"deep learning\" group by t4.venueid order by count ( t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many publications were added to the Cell journal this year ?", "output": "select distinct count ( t3.paperid ) from paper as t3 join journal as t2 on t3.journalid = t2.journalid join paperkeyphrase as t1 on t3.paperid = t1.paperid where t2.journalname = \"Cell\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many articles were published in the Cell journal in 2015 ?", "output": "select distinct count ( t3.paperid ) from paper as t3 join journal as t2 on t3.journalid = t2.journalid join paperkeyphrase as t1 on t3.paperid = t1.paperid where t2.journalname = \"Cell\" and t3.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are all the publication titles by Donald E Knuth ?", "output": "select distinct t3.title from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Donald e Knuth\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers published in eccv 2016 by ali farhadi", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ali farhadi\" and t3.year = 2016 and t4.venuename = \"eccv\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Does ali farhadi have a paper in eccv in 2016 ?", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ali farhadi\" and t3.year = 2016 and t4.venuename = \"eccv\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers of ali farhadi in eccv 2016", "output": "select distinct t3.paperid from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"ali farhadi\" and t3.year = 2016 and t4.venuename = \"eccv\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are some papers dealing with Semantic Data in YAGO ?", "output": "select distinct t2.paperid from paperdataset as t3 join dataset as t1 on t3.datasetid = t1.datasetid join paperkeyphrase as t2 on t2.paperid = t3.paperid join keyphrase as t4 on t2.keyphraseid = t4.keyphraseid where t1.datasetname = \"YAGO\" and t4.keyphrasename = \"Semantic Data\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who has published more papers in chi ?", "output": "select distinct count ( distinct t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"chi\" group by t1.authorid order by count ( distinct t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who has written the most papers at chi ?", "output": "select distinct count ( distinct t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"chi\" group by t1.authorid order by count ( distinct t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how is the most prolific author in chi ?", "output": "select distinct count ( distinct t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"chi\" group by t1.authorid order by count ( distinct t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who published the most at chi", "output": "select distinct count ( distinct t2.paperid ), t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"chi\" group by t1.authorid order by count ( distinct t2.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "In what year did Ye Cao publish the most papers", "output": "select distinct count ( distinct t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname like \"Ye Cao\" group by t3.year order by count ( distinct t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What year did Ye Cao publish the most papers", "output": "select distinct count ( distinct t3.paperid ), t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname like \"Ye Cao\" group by t3.year order by count ( distinct t3.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "conferences that mention ImageNet", "output": "select distinct t3.venueid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid where t1.datasetname = \"ImageNet\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "first deep learning paper", "output": "select distinct t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" group by t3.year order by t3.year asc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What was the first paper on deep learning written ?", "output": "select distinct t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" group by t3.year order by t3.year asc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When was deep learning proposed ?", "output": "select distinct t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" group by t3.year order by t3.year asc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "when was the first deep learning paper published ?", "output": "select distinct t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"deep learning\" group by t3.year order by t3.year asc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers were published in Academic radiology in 1995 ?", "output": "select distinct t2.paperid from paper as t2 join journal as t1 on t2.journalid = t1.journalid where t1.journalname = \"Academic radiology\" and t2.year = 1995;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what papers do parsing papers typically cite ?", "output": "select distinct t4.citedpaperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citingpaperid where t1.keyphrasename = \"parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers typically cited by parsing papers", "output": "select distinct t4.citedpaperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citingpaperid where t1.keyphrasename = \"parsing\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "venue for Trophic Cascade", "output": "select distinct t3.venueid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Trophic Cascade\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "conferences for Trophic Cascade", "output": "select distinct t3.venueid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Trophic Cascade\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what conferences are related to Trophic Cascade", "output": "select distinct t3.venueid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Trophic Cascade\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What was the conference name that approved Trophic Cascade ?", "output": "select distinct t3.venueid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Trophic Cascade\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers were written on question answering in 2011 through 2016 ?", "output": "select distinct count ( t3.paperid ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"question answering\" and t3.year >= 2011;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What are the best NLP conferences ?", "output": "select distinct count ( distinct t4.citingpaperid ), t3.venueid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join cite as t4 on t3.paperid = t4.citedpaperid where t1.keyphrasename = \"NLP\" group by t3.venueid order by count ( distinct t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "ACL papers by author", "output": "select distinct t2.paperid, t1.authorid from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t3.venuename = \"ACL\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers with more than 10 citations", "output": "select distinct t2.citingpaperid from paper as t1 join cite as t2 on t1.paperid = t2.citedpaperid group by t2.citingpaperid having count ( distinct t2.citedpaperid ) > 10;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Which authors published papers in 2015 ?", "output": "select distinct t1.authorid from writes as t1 join paper as t2 on t1.paperid = t2.paperid where t2.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "who wrote papers in 2015", "output": "select distinct t1.authorid from writes as t1 join paper as t2 on t1.paperid = t2.paperid where t2.year = 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what keyphrase does Brian DeRenzi write about that gets most citations ?", "output": "select distinct t1.keyphrasename, sum ( t3.numcitedby ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Brian DeRenzi\" group by t1.keyphrasename order by sum ( t3.numcitedby ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "main topics of work by Brian DeRenzi", "output": "select distinct t1.keyphrasename, sum ( t3.numcitedby ) from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t5 on t4.authorid = t5.authorid where t5.authorname = \"Brian DeRenzi\" group by t1.keyphrasename order by sum ( t3.numcitedby ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "authors with at least 5 papers", "output": "select distinct count ( t2.paperid ), t1.authorid from writes as t1 join paper as t2 on t1.paperid = t2.paperid group by t1.authorid having count ( t2.paperid ) >= 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers that were not published in the last year", "output": "select distinct paperid from paper where year != 2015;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When was Michael Stonebraker GIS Database published ?", "output": "select distinct t3.year from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Michael Stonebraker\" and t5.keyphrasename = \"GIS Database\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When did Michael Stonebraker publish his GIS Database paper ?", "output": "select distinct t3.year from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Michael Stonebraker\" and t5.keyphrasename = \"GIS Database\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When does Michael Stonebraker publish the GIS Database paper ?", "output": "select distinct t3.year from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join paper as t3 on t3.paperid = t2.paperid join writes as t4 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname = \"Michael Stonebraker\" and t5.keyphrasename = \"GIS Database\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "In 2010 what journal published an article about Trophic Cascade ?", "output": "select distinct t3.journalid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"Trophic Cascade\" and t3.year = 2010 group by t3.journalid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the most popular paper this year in CVPR ?", "output": "select distinct t3.citedpaperid, count ( t3.citingpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2016 and t2.venuename = \"CVPR\" group by t3.citedpaperid order by count ( t3.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many citations does luke zettlemoyer have per year", "output": "select distinct count ( t4.citedpaperid ), t3.year from paper as t3 join cite as t4 on t3.paperid = t4.citedpaperid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"luke zettlemoyer\" group by t3.year;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "authors working on ImageNet", "output": "select distinct t2.paperid from paperdataset as t3 join dataset as t1 on t3.datasetid = t1.datasetid join paper as t4 on t4.paperid = t3.paperid join writes as t2 on t2.paperid = t4.paperid where t1.datasetname = \"ImageNet\" group by t2.paperid;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What articles have been published since 2006 about the effects of juicing for cancer patients ?", "output": "select distinct paperid, title from paper where title like \"the effects of juicing for cancer patients\" and year > 2006;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Eric C. Kerrigan 's Liquid Automatica paper", "output": "select distinct t2.paperid from paperkeyphrase as t5 join keyphrase as t3 on t5.keyphraseid = t3.keyphraseid join writes as t4 on t4.paperid = t5.paperid join paper as t2 on t4.paperid = t2.paperid join author as t1 on t4.authorid = t1.authorid join venue as t6 on t6.venueid = t2.venueid where t1.authorname = \"Eric c. Kerrigan\" and t3.keyphrasename = \"Liquid\" and t6.venuename = \"Automatica\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Where did sergey levine publish his last paper ?", "output": "select distinct t3.venueid, t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"sergey levine\" group by t3.venueid, t3.year order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "keyphrases used by dan klein in his emnlp papers", "output": "select distinct t2.keyphraseid from paper as t3 join paperkeyphrase as t2 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid join writes as t5 on t5.paperid = t3.paperid join author as t1 on t5.authorid = t1.authorid where t1.authorname = \"dan klein\" and t4.venuename = \"emnlp\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Who are the prominent researchers in Neutralizing Antibody in 2012 ?", "output": "select distinct count ( t4.paperid ), t3.authorid from paperkeyphrase as t1 join keyphrase as t2 on t1.keyphraseid = t2.keyphraseid join paper as t4 on t4.paperid = t1.paperid join writes as t3 on t3.paperid = t4.paperid where t2.keyphrasename = \"Neutralizing Antibody\" and t4.year = 2012 group by t3.authorid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "the papers at eccv in 2014 using ImageNet dataset", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.datasetname = \"ImageNet\" and t3.year = 2014 and t4.venuename = \"eccv\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which papers in eccv 2014 use ImageNet ?", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.datasetname = \"ImageNet\" and t3.year = 2014 and t4.venuename = \"eccv\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "eccv 2014 papers using ImageNet", "output": "select distinct t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.datasetname = \"ImageNet\" and t3.year = 2014 and t4.venuename = \"eccv\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Euclidean Distance papers citing NIPS papers", "output": "select distinct t5.citingpaperid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join cite as t5 on t2.paperid = t5.citingpaperid join paper as t3 on t3.paperid = t5.citedpaperid join venue as t4 on t4.venueid = t3.venueid where t1.keyphrasename = \"Euclidean Distance\" and t4.venuename = \"NIPS\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "top authors working on ImageNet ?", "output": "select distinct count ( t4.paperid ), t3.paperid from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t4 on t4.paperid = t2.paperid join writes as t3 on t3.paperid = t4.paperid where t1.datasetname = \"ImageNet\" group by t3.paperid order by count ( t4.paperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "how many ACL 2012 papers have more than 7 citations ?", "output": "select distinct ( t1.paperid ), count ( t3.citingpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t1.year = 2012 and t2.venuename = \"ACL\" group by t1.paperid having count ( t3.citingpaperid ) > 7;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What was the topic of best paper in 2012 EMNLP-CoNLL ?", "output": "select distinct count ( distinct t4.citingpaperid ), t1.keyphraseid, t2.paperid from paper as t2 join cite as t4 on t2.paperid = t4.citedpaperid join paperkeyphrase as t1 on t2.paperid = t1.paperid join venue as t3 on t3.venueid = t2.venueid where t2.year = 2012 and t3.venuename = \"EMNLP-CoNLL\" group by t2.paperid, t1.keyphraseid order by count ( distinct t4.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers has Noah Smith co-authored since 2009 ?", "output": "select distinct count ( distinct t2.paperid ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname != \"Noah Smith\" and t3.year > 2009 and t2.paperid in ( select t2.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid where t1.authorname like \"Noah Smith\" );"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Number of ACL papers with more than 2 citations", "output": "select distinct count ( t3.citingpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t2.venuename = \"ACL\" group by t3.citingpaperid having count ( distinct t3.citedpaperid ) > 2;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the name of Eric C. Kerrigan 's Liquid Automatica paper ?", "output": "select distinct t2.title from paperkeyphrase as t5 join keyphrase as t3 on t5.keyphraseid = t3.keyphraseid join writes as t4 on t4.paperid = t5.paperid join paper as t2 on t4.paperid = t2.paperid join author as t1 on t4.authorid = t1.authorid join venue as t6 on t6.venueid = t2.venueid where t1.authorname like \"Eric c. Kerrigan\" and t3.keyphrasename = \"Liquid\" and t6.venuename = \"Automatica\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers used ImageNet datasets in cvpr ?", "output": "select distinct count ( t3.paperid ) from paperdataset as t2 join dataset as t1 on t2.datasetid = t1.datasetid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t1.datasetname = \"ImageNet\" and t4.venuename = \"cvpr\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What venues are for Neuroscience ?", "output": "select distinct venueid from venue where venuename = \"Neuroscience\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "When was the last time Mary Crainie published a paper ?", "output": "select distinct max ( t3.year ) from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Mary Crainie\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "I want the co-authors of papers on Machine Translation Output with Philipp Koehn", "output": "select distinct t1.authorid from paperkeyphrase as t6 join keyphrase as t3 on t6.keyphraseid = t3.keyphraseid join writes as t4 on t4.paperid = t6.paperid join writes as t5 on t5.paperid = t4.paperid join author as t1 on t5.authorid = t1.authorid join author as t2 on t4.authorid = t2.authorid where t2.authorname = \"Philipp Koehn\" and t3.keyphrasename = \"Machine translation Output\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many papers does Samuel Madden publish outside of PVLDB area ?", "output": "select distinct count ( distinct t3.paperid ) from venue as t4 join paper as t3 on t4.venueid = t3.venueid join writes as t2 on t2.paperid = t3.paperid join author as t1 on t2.authorid = t1.authorid where t1.authorname = \"Samuel Madden\" and t4.venuename != \"PVLDB\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "which journal did Donald E Knuth publish his last paper ?", "output": "select distinct t3.journalid, t3.year from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Donald e Knuth\" group by t3.journalid, t3.year order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the venue of Fracture of acrylic bone cement ?", "output": "select distinct venueid from paper where title = \"Fracture of acrylic bone cement\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "How many authors published at sigcse in 2010 ?", "output": "select distinct count ( t2.paperid ) from venue as t3 join paper as t2 on t3.venueid = t2.venueid join writes as t1 on t1.paperid = t2.paperid where t2.year = 2010 and t3.venuename = \"sigcse\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the year of publication of \" A Switching Architecture For ISDN \" ?", "output": "select distinct title, year from paper where title = \"A switching architecture for ISDN\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "what keywords are used by papers at uist", "output": "select distinct t1.keyphraseid from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid join venue as t4 on t4.venueid = t3.venueid where t4.venuename = \"uist\";"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "Give me the papers written by Su-In Lee before 2012 .", "output": "select distinct t3.paperid from writes as t2 join author as t1 on t2.authorid = t1.authorid join paper as t3 on t2.paperid = t3.paperid where t1.authorname = \"Su-in Lee\" and t3.year < 2012;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers in semantic parsing for each year", "output": "select distinct count ( t3.paperid ), t3.year from paperkeyphrase as t2 join keyphrase as t1 on t2.keyphraseid = t1.keyphraseid join paper as t3 on t3.paperid = t2.paperid where t1.keyphrasename = \"semantic parsing\" group by t3.year order by t3.year desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers with at least 5 citations", "output": "select distinct t2.citingpaperid from paper as t1 join cite as t2 on t1.paperid = t2.citedpaperid group by t2.citingpaperid having count ( distinct t2.citedpaperid ) >= 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "papers cited by at least 5 papers", "output": "select distinct t2.citingpaperid from paper as t1 join cite as t2 on t1.paperid = t2.citedpaperid group by t2.citingpaperid having count ( distinct t2.citedpaperid ) >= 5;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the most cited paper at sigcomm ?", "output": "select distinct t3.citedpaperid, count ( t3.citingpaperid ) from paper as t1 join cite as t3 on t1.paperid = t3.citedpaperid join venue as t2 on t2.venueid = t1.venueid where t2.venuename = \"sigcomm\" group by t3.citedpaperid order by count ( t3.citingpaperid ) desc;"}, {"instruction": "scholar contains tables such as venue, author, dataset, journal, keyphrase, paper, cite, paperdataset, paperkeyphrase, writes. Table venue has columns such as venueid, venuename. venueid is the primary key. Table author has columns such as authorid, authorname. authorid is the primary key. Table dataset has columns such as datasetid, datasetname. datasetid is the primary key. Table journal has columns such as journalid, journalname. journalid is the primary key. Table keyphrase has columns such as keyphraseid, keyphrasename. keyphraseid is the primary key. Table paper has columns such as paperid, title, venueid, year, numciting, numcitedby, journalid. paperid is the primary key. Table cite has columns such as citingpaperid, citedpaperid. citingpaperid is the primary key. Table paperdataset has columns such as paperid, datasetid. datasetid is the primary key. Table paperkeyphrase has columns such as paperid, keyphraseid. keyphraseid is the primary key. Table writes has columns such as paperid, authorid. paperid is the primary key. The venueid of paper is the foreign key of venueid of venue. The journalid of paper is the foreign key of journalid of journal. The citingpaperid of cite is the foreign key of paperid of paper. The citedpaperid of cite is the foreign key of paperid of paper. The keyphraseid of paperkeyphrase is the foreign key of keyphraseid of keyphrase. The paperid of paperkeyphrase is the foreign key of paperid of paper. The authorid of writes is the foreign key of authorid of author. The paperid of writes is the foreign key of paperid of paper.", "input": "What is the name of Ranjit Jhala 's Liquid Haskell paper ?", "output": "select distinct t3.title from paperkeyphrase as t2 join keyphrase as t5 on t2.keyphraseid = t5.keyphraseid join writes as t4 on t4.paperid = t2.paperid join paper as t3 on t4.paperid = t3.paperid join author as t1 on t4.authorid = t1.authorid where t1.authorname like \"Ranjit Jhala\" and t5.keyphrasename = \"Liquid Haskell\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all the businesses with more than 4.5 stars", "output": "select name from business where rating > 4.5;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all businesses with rating 3.5", "output": "select name from business where rating = 3.5;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all user ids with name Michelle", "output": "select user_id from user where name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all states in which there is a Whataburger", "output": "select state from business where name = \"Whataburger\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all cities in which there is a restaurant called \" MGM Grand Buffet \"", "output": "select t1.city from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"MGM grand Buffet\" and t2.category_name = \"category_category_name0\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the cities of businesses rated below 1.5", "output": "select city from business where rating < 1.5;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all cities which has a \" Taj Mahal \" .", "output": "select city from business where name = \"Taj Mahal\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all the reviews which rated a business less than 1", "output": "select text from review where rating < 1;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all the restaurant rated more than 3.5", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.rating > 3.5 and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find all cities which has a \" Taj Mahal \" restaurant", "output": "select t1.city from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"Taj Mahal\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "list all the reviews by Niloofar", "output": "select t1.text from user as t2 join review as t1 on t2.user_id = t1.user_id where t2.name = \"Niloofar\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "list all the businesses which have a review by Niloofar", "output": "select t1.name from review as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t3.name = \"Niloofar\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "list all the businesses which Niloofar rated 5", "output": "select t1.name from review as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t2.rating = 5 and t3.name = \"Niloofar\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all the reviews by Michelle for Italian restaurant", "output": "select t4.text from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join review as t4 on t4.business_id = t1.business_id join user as t5 on t5.user_id = t4.user_id where t2.category_name = \"Italian\" and t3.category_name = \"category_category_name1\" and t5.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find the number of reviews written for \" Cafe Zinho \" restaurant in Texas", "output": "select count ( distinct t3.text ) from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id where t1.name = \"Cafe Zinho\" and t1.state = \"Texas\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all 5 star Italian restaurant", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.rating = 5 and t2.category_name = \"Italian\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all the neighbourhoods with Italian restaurant in Madison", "output": "select t1.neighbourhood_name from category as t3 join business as t2 on t3.business_id = t2.business_id join category as t4 on t4.business_id = t2.business_id join neighbourhood as t1 on t1.business_id = t2.business_id where t2.city = \"Madison\" and t3.category_name = \"Italian\" and t4.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all the neighbourhoods with Italian restaurant rated less than 2.5 in Madison", "output": "select t1.neighbourhood_name from category as t3 join business as t2 on t3.business_id = t2.business_id join category as t4 on t4.business_id = t2.business_id join neighbourhood as t1 on t1.business_id = t2.business_id where t2.city = \"Madison\" and t2.rating < 2.5 and t3.category_name = \"Italian\" and t4.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find all the restaurant in Pennsylvania", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.state = \"Pennsylvania\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all businesses that are restaurant in Pennsylvania .", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.state = \"Pennsylvania\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all the reviews for all Pet Groomers with more than 100 reviews", "output": "select t3.text from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id where t1.review_count > 100 and t2.category_name = \"Pet Groomers\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What are all the breweries in \" Los Angeles \" ?", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"breweries\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all breweries in Los Angeles", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"breweries\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all breweries in \" Los Angeles \"", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"breweries\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all users who reviewed restaurant \" Mesa Grill \"", "output": "select t4.name from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t1.name = \"Mesa Grill\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List the addresses of all Walmart in \" Los Angeles \"", "output": "select full_address from business where city = \"Los Angeles\" and name = \"Walmart\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all restaurant reviewed by Patrick in \" Dallas \"", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t1.city = \"Dallas\" and t2.category_name = \"restaurant\" and t4.name = \"Patrick\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Which restaurant in Dallas were reviewed by user Patrick ?", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t1.city = \"Dallas\" and t2.category_name = \"restaurant\" and t4.name = \"Patrick\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Bars reviewed by Patrick", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t2.category_name = \"Bars\" and t4.name = \"Patrick\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Bars reviewed by Patrick with at least 3 stars", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t1.rating >= 3 and t2.category_name = \"Bars\" and t4.name = \"Patrick\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all users who have written tips for \" Barrio Cafe \" in 2015", "output": "select t3.name from tip as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t1.name = \"Barrio Cafe\" and t2.year = 2015;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all businesses in Texas with a rating below 2", "output": "select name from business where rating < 2 and state = \"Texas\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all restaurant Seafood in Los Angeles", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"Seafood\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all the Seafood restaurant in \" Los Angeles \"", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"Seafood\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all restaurant that serve Seafood in \" Los Angeles \"", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"Seafood\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all reviews by Patrick with a rating above 4", "output": "select t1.text from user as t2 join review as t1 on t2.user_id = t1.user_id where t1.rating > 4 and t2.name = \"Patrick\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Apple Store in \" Los Angeles \"", "output": "select business_id from business where city = \"Los Angeles\" and name = \"Apple Store\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Dallas restaurant with a rating above 4.5", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Dallas\" and t1.rating > 4.5 and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What neighbourhood is restaurant \" Flat Top Grill \" in ?", "output": "select t1.neighbourhood_name from category as t3 join business as t2 on t3.business_id = t2.business_id join neighbourhood as t1 on t1.business_id = t2.business_id where t2.name = \"Flat top Grill\" and t3.category_name = \"category_category_name0\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all tips about \" Vintner Grill \" that received more than 9 likes", "output": "select t2.text from tip as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"Vintner Grill\" and t2.likes > 9;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all reviews about \" Kabob Palace \" in year 2014", "output": "select t2.text from review as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"Kabob Palace\" and t2.year = 2014;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all users who have written tips about businesses in Dallas", "output": "select t3.name from tip as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t1.city = \"Dallas\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all cities in Texas in which there is a restaurant called \" MGM Grand Buffet \"", "output": "select t1.city from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"MGM grand Buffet\" and t1.state = \"Texas\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the users who have given tips on Pet Groomers", "output": "select t4.name from category as t2 join business as t1 on t2.business_id = t1.business_id join tip as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t2.category_name = \"Pet Groomers\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all tips for \" Cafe Zinho \" in Texas .", "output": "select t2.text from tip as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"Cafe Zinho\" and t1.state = \"Texas\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all users who reviewed businesses that are restaurant .", "output": "select t4.name from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all tips for \" Cafe Zinho \" in Pennsylvania in 2010 .", "output": "select t2.text from tip as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"Cafe Zinho\" and t1.state = \"Pennsylvania\" and t2.year = 2010;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "List all users who reviewed businesses that are restaurant in 2010 .", "output": "select t4.name from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t2.category_name = \"restaurant\" and t3.year = 2010;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all the tips from a user who has written a review in 2012", "output": "select t2.text from user as t3 join review as t1 on t3.user_id = t1.user_id join tip as t2 on t3.user_id = t2.user_id where t1.year = 2012;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all reviews for businesses rated 2.5", "output": "select t2.text from review as t2 join business as t1 on t2.business_id = t1.business_id where t1.rating = 2.5;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find the number of escape games in Madison", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Madison\" and t2.category_name = \"escape games\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the number of escape games in Madison", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Madison\" and t2.category_name = \"escape games\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many escape games exist in Madison", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Madison\" and t2.category_name = \"escape games\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the number of escape games in \" Madison \" ?", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Madison\" and t2.category_name = \"escape games\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many escape games are there in Madison ?", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Madison\" and t2.category_name = \"escape games\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find the number of restaurant rated more than 3.5", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.rating > 3.5 and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find the total checkins in Moroccan restaurant in \" Los Angeles \"", "output": "select sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"restaurant\" and t3.category_name = \"Moroccan\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find the total checkins in Moroccan restaurant in \" Los Angeles \" on Friday", "output": "select sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"Moroccan\" and t3.category_name = \"restaurant\" and t4.day = \"Friday\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find the total checkins in Moroccan restaurant in \" Los Angeles \" per day", "output": "select t4.day, sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t1.city = \"Los Angeles\" and t2.category_name = \"Moroccan\" and t3.category_name = \"restaurant\" group by t4.day;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "find the total checkins in Italian Delis in each state on Sunday", "output": "select t1.state, sum ( t4.count ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id join checkin as t4 on t4.business_id = t1.business_id where t2.category_name = \"Italian\" and t3.category_name = \"Delis\" and t4.day = \"Sunday\" group by t1.state;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many reviews has Niloofar written in 2015", "output": "select count ( distinct t1.text ) from user as t2 join review as t1 on t2.user_id = t1.user_id where t1.year = 2015 and t2.name = \"Niloofar\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "what is the average rating given in Michelle reviews", "output": "select avg ( t1.rating ) from user as t2 join review as t1 on t2.user_id = t1.user_id where t2.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the number of checkins for \" Cafe Zinho \" on Friday", "output": "select t2.count from checkin as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"Cafe Zinho\" and t2.day = \"Friday\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "how many users reviewed \" Sushi Too \" in Pittsburgh", "output": "select count ( distinct t3.name ) from review as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t1.city = \"Pittsburgh\" and t1.name = \"Sushi Too\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the number of restaurant in Pittsburgh rated 4.5", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Pittsburgh\" and t1.rating = 4.5 and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many tips have been written in 2015", "output": "select count ( distinct text ) from tip where year = 2015;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the total likes on tips from Niloofar", "output": "select sum ( t1.likes ) from user as t2 join tip as t1 on t2.user_id = t1.user_id where t2.name = \"Niloofar\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the total likes on tips about \" Cafe Zinho \"", "output": "select sum ( t2.likes ) from tip as t2 join business as t1 on t2.business_id = t1.business_id where t1.name = \"Cafe Zinho\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the total likes on tips from Niloofar about \" Cafe Zinho \"", "output": "select sum ( t2.likes ) from tip as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t1.name = \"Cafe Zinho\" and t3.name = \"Niloofar\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many tips has Michelle written in 2010", "output": "select count ( distinct t1.text ) from user as t2 join tip as t1 on t2.user_id = t1.user_id where t1.year = 2010 and t2.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Return me the number of tips that are written by Michelle in 2010 .", "output": "select count ( distinct t1.text ) from user as t2 join tip as t1 on t2.user_id = t1.user_id where t1.year = 2010 and t2.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many tips has Michelle written in April", "output": "select count ( distinct t1.text ) from user as t2 join tip as t1 on t2.user_id = t1.user_id where t1.month = \"April\" and t2.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "what is the number of restaurant in Texas", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.state = \"Texas\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many Bars in \" Dallas \" have a rating above 3.5 ?", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Dallas\" and t1.rating > 3.5 and t2.category_name = \"Bars\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many Bars in Dallas have a rating above 3.5 ?", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Dallas\" and t1.rating > 3.5 and t2.category_name = \"Bars\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many people reviewed the restaurant \" Texas de Brazil \" in Dallas Texas ?", "output": "select count ( distinct t4.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t1.city = \"Dallas\" and t1.name = \"Texas de Brazil\" and t1.state = \"Texas\" and t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many people reviewed \" Bistro Di Napoli \" in 2015 ?", "output": "select count ( distinct t3.name ) from review as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t1.name = \"Bistro di Napoli\" and t2.year = 2015;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many restaurant are there in the Hazelwood district of Dallas ?", "output": "select count ( distinct t1.name ) from category as t3 join business as t1 on t3.business_id = t1.business_id join neighbourhood as t2 on t2.business_id = t1.business_id where t1.city = \"Dallas\" and t3.category_name = \"restaurant\" and t2.neighbourhood_name = \"Hazelwood\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many Starbucks are there in Dallas Texas ?", "output": "select count ( distinct business_id ) from business where city = \"Dallas\" and name = \"Starbucks\" and state = \"Texas\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many reviews does \" Acacia Cafe \" have ?", "output": "select review_count from business where name = \"Acacia Cafe\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the average number of checkins in restaurant \" Barrio Cafe \" per day", "output": "select avg ( t3.count ), t3.day from category as t2 join business as t1 on t2.business_id = t1.business_id join checkin as t3 on t3.business_id = t1.business_id where t1.name = \"Barrio Cafe\" and t2.category_name = \"restaurant\" group by t3.day;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many businesses are there in the \" Stone Meadows \" neighbourhood in Madison ?", "output": "select count ( distinct t1.name ) from neighbourhood as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Madison\" and t2.neighbourhood_name = \"Stone Meadows\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many reviews has Adrienne written ?", "output": "select count ( distinct t1.text ) from user as t2 join review as t1 on t2.user_id = t1.user_id where t2.name = \"Adrienne\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many reviews has Michelle written in March 2014 ?", "output": "select count ( distinct t1.text ) from user as t2 join review as t1 on t2.user_id = t1.user_id where t1.month = \"March\" and t1.year = 2014 and t2.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many businesses has Michelle reviewed in 2010 ?", "output": "select count ( distinct t1.name ) from review as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t2.year = 2010 and t3.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many businesses in \" San Diego \" has Christine reviewed in 2010 ?", "output": "select count ( distinct t1.name ) from review as t2 join business as t1 on t2.business_id = t1.business_id join user as t3 on t3.user_id = t2.user_id where t1.city = \"San Diego\" and t2.year = 2010 and t3.name = \"Christine\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many Target are there in \" Los Angeles \" ?", "output": "select count ( distinct business_id ) from business where city = \"Los Angeles\" and name = \"Target\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many users have reviewed Irish Pub in Dallas ?", "output": "select count ( distinct t4.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t1.city = \"Dallas\" and t2.category_name = \"Irish Pub\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "What is the average rating of reviews written in year 2014 ?", "output": "select avg ( rating ) from review where year = 2014;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many people reviewed restaurant \" Vintner Grill \" in 2010 ?", "output": "select count ( distinct t4.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id join review as t3 on t3.business_id = t1.business_id join user as t4 on t4.user_id = t3.user_id where t1.name = \"Vintner Grill\" and t2.category_name = \"category_category_name0\" and t3.year = 2010;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the number of reviews on businesses located in \" South Summerlin \" neighbourhood", "output": "select count ( distinct t3.text ) from neighbourhood as t1 join business as t2 on t1.business_id = t2.business_id join review as t3 on t3.business_id = t2.business_id where t1.neighbourhood_name = \"South Summerlin\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the number of users called Michelle", "output": "select count ( distinct name ) from user where name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Return me the number of businesses that are restaurant .", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id where t2.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Return me the number of cities that has \" Panda Express \" .", "output": "select count ( distinct city ) from business where name = \"Panda Express\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Return me the number of tips that are written by Michelle .", "output": "select count ( distinct t1.text ) from user as t2 join tip as t1 on t2.user_id = t1.user_id where t2.name = \"Michelle\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the total checkins in \" Brighton Heights \" neighbourhood", "output": "select sum ( t3.count ) from checkin as t3 join business as t1 on t3.business_id = t1.business_id join neighbourhood as t2 on t2.business_id = t1.business_id where t2.neighbourhood_name = \"Brighton Heights\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the total number of reviews written in March", "output": "select count ( distinct text ) from review where month = \"March\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the number of tips written in each month", "output": "select count ( distinct text ), month from tip group by month;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many neighbourhoods have a business with rating 5 in Madison ?", "output": "select count ( distinct t1.neighbourhood_name ) from neighbourhood as t1 join business as t2 on t1.business_id = t2.business_id where t2.city = \"Madison\" and t2.rating = 5;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Give me all the Moroccan restaurant in Texas", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.state = \"Texas\" and t2.category_name = \"Moroccan\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "which business has the most number of checkins", "output": "select t1.name from checkin as t2 join business as t1 on t2.business_id = t1.business_id group by t1.name order by sum ( t2.count ) desc limit 1;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "which neighbourhood has the most number of businesses in Madison", "output": "select t1.neighbourhood_name from neighbourhood as t1 join business as t2 on t1.business_id = t2.business_id where t2.city = \"Madison\" group by t1.neighbourhood_name order by count ( distinct t2.name ) desc limit 1;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Mexican restaurant in Dallas with at least 3.5 stars", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.city = \"Dallas\" and t1.rating > 3.5 and t2.category_name = \"Mexican\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Mexican restaurant in Dallas with a rating above 3.5", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.city = \"Dallas\" and t1.rating > 3.5 and t2.category_name = \"Mexican\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all restaurant with Valet Service in Dallas Texas", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.city = \"Dallas\" and t1.state = \"Texas\" and t2.category_name = \"Valet Service\" and t3.category_name = \"restaurant\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Italian restaurant in the Meadowood neighbourhood of Madison", "output": "select t1.name from category as t3 join business as t1 on t3.business_id = t1.business_id join category as t4 on t4.business_id = t1.business_id join neighbourhood as t2 on t2.business_id = t1.business_id where t1.city = \"Madison\" and t3.category_name = \"Italian\" and t4.category_name = \"restaurant\" and t2.neighbourhood_name = \"Meadowood\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find all Bars in \" Los Angeles \" with at least 30 reviews and average rating above 3 stars", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id where t1.city = \"Los Angeles\" and t1.rating > 3 and t1.review_count > 30 and t2.category_name = \"Bars\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "How many Egyptian restaurant are there in Edinburgh ?", "output": "select count ( distinct t1.name ) from category as t2 join business as t1 on t2.business_id = t1.business_id join category as t3 on t3.business_id = t1.business_id where t1.city = \"Edinburgh\" and t2.category_name = \"restaurant\" and t3.category_name = \"Egyptian\";"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find users whose average review rating is below 3", "output": "select t2.name from user as t2 join review as t1 on t2.user_id = t1.user_id group by t2.name having avg ( t1.rating ) < 3;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the business with the most number of reviews in April", "output": "select t1.name from review as t2 join business as t1 on t2.business_id = t1.business_id where t2.month = \"April\" group by t1.name order by count ( distinct t2.text ) desc limit 1;"}, {"instruction": "yelp contains tables such as business, category, user, checkin, neighbourhood, review, tip. Table business has columns such as bid, business_id, name, full_address, city, latitude, longitude, review_count, is_open, rating, state. bid is the primary key. Table category has columns such as id, business_id, category_name. id is the primary key. Table user has columns such as uid, user_id, name. uid is the primary key. Table checkin has columns such as cid, business_id, count, day. cid is the primary key. Table neighbourhood has columns such as id, business_id, neighbourhood_name. id is the primary key. Table review has columns such as rid, business_id, user_id, rating, text, year, month. rid is the primary key. Table tip has columns such as tip_id, business_id, text, user_id, likes, year, month. tip_id is the primary key. The business_id of category is the foreign key of business_id of business. The business_id of checkin is the foreign key of business_id of business. The business_id of neighbourhood is the foreign key of business_id of business. The user_id of review is the foreign key of user_id of user. The business_id of review is the foreign key of business_id of business. The user_id of tip is the foreign key of user_id of user. The business_id of tip is the foreign key of business_id of business.", "input": "Find the business which has the most number of categories", "output": "select t1.name from category as t2 join business as t1 on t2.business_id = t1.business_id group by t1.name order by count ( distinct t2.category_name ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the homepage of PVLDB .", "output": "select homepage from journal where name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the homepage of \" H. V. Jagadish \" .", "output": "select homepage from author where name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the abstract of \" Making database systems usable \" .", "output": "select abstract from publication where title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the year of \" Making database systems usable \"", "output": "select year from publication where title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the year of \" Making database systems usable \" .", "output": "select year from publication where title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers after 2000 .", "output": "select title from publication where year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the homepage of the VLDB conference .", "output": "select homepage from conference where name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the keywords .", "output": "select keyword from keyword;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the organizations .", "output": "select name from organization;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the organizations in \" North America \" .", "output": "select name from organization where continent = \"North America\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the homepage of \" University of Michigan \" .", "output": "select homepage from organization where name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of references of \" Making database systems usable \" .", "output": "select reference_num from publication where title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the references of \" Making database systems usable \" .", "output": "select reference_num from publication where title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of citations of \" Making database systems usable \" .", "output": "select citation_num from publication where title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the citations of \" Making database systems usable \" .", "output": "select citation_num from publication where title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper with more than 200 citations .", "output": "select title from publication where citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers in PVLDB 2010 .", "output": "select t1.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"PVLDB\" and t4.year = 2010;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers in PVLDB after 2010 .", "output": "select t1.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"PVLDB\" and t4.year > 2010;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers in VLDB conference in 2002 .", "output": "select t1.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"VLDB\" and t4.year = 2002;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers in VLDB conference before 2002 .", "output": "select t1.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"VLDB\" and t4.year < 2002;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers in VLDB conference before 2002 after 1995 .", "output": "select t1.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"VLDB\" and t4.year < 2002 and t4.year > 1995;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the area of PVLDB .", "output": "select t3.name from domain as t3 join domain_journal as t1 on t3.did = t1.did join journal as t2 on t2.jid = t1.jid where t2.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers in PVLDB .", "output": "select t1.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the organization \" H. V. Jagadish \" is in .", "output": "select t2.name from organization as t2 join author as t1 on t2.oid = t1.oid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the conferences, which have papers by \" H. V. Jagadish \" .", "output": "select t2.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the journals, which have papers by \" H. V. Jagadish \" .", "output": "select t2.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the domain where \" H. V. Jagadish \" is focused .", "output": "select t2.name from domain_author as t3 join author as t1 on t3.aid = t1.aid join domain as t2 on t2.did = t3.did where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors of \" Making database systems usable \" .", "output": "select t1.name from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t3.title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the conference, which published \" Making database systems usable \" .", "output": "select t1.name from publication as t2 join conference as t1 on t2.cid = t1.cid where t2.title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" .", "output": "select t3.title from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers on VLDB conference .", "output": "select t2.title from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers on PVLDB .", "output": "select t2.title from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers on PVLDB after 2000 .", "output": "select t2.title from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers on VLDB conference after 2000 .", "output": "select t2.title from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" on PVLDB .", "output": "select t4.title from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" on VLDB conference .", "output": "select t4.title from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" after 2000 .", "output": "select t3.title from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t1.name = \"H. v. Jagadish\" and t3.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" on PVLDB after 2000 .", "output": "select t4.title from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"PVLDB\" and t4.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" on VLDB conference after 2000 .", "output": "select t4.title from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"VLDB\" and t4.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the area of the VLDB conference .", "output": "select t2.name from domain_conference as t3 join conference as t1 on t3.cid = t1.cid join domain as t2 on t2.did = t3.did where t1.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers in the VLDB conference .", "output": "select t1.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the keywords in Databases area .", "output": "select t1.keyword from domain as t3 join domain_keyword as t2 on t3.did = t2.did join keyword as t1 on t1.kid = t2.kid where t3.name = \"Databases\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the papers, which contain the keyword \" Natural Language \" .", "output": "select t3.title from publication_keyword as t2 join keyword as t1 on t2.kid = t1.kid join publication as t3 on t3.pid = t2.pid where t1.keyword = \"Natural Language\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords of \" Making database systems usable \" .", "output": "select t1.keyword from publication_keyword as t3 join keyword as t1 on t3.kid = t1.kid join publication as t2 on t2.pid = t3.pid where t2.title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords related to \" H. V. Jagadish \" .", "output": "select t1.keyword from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t2.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords in VLDB conference .", "output": "select t1.keyword from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t3 on t3.pid = t4.pid join conference as t2 on t3.cid = t2.cid where t2.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords in PVLDB .", "output": "select t1.keyword from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t2 on t2.pid = t4.pid join journal as t3 on t2.jid = t3.jid where t3.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords in the papers of \" University of Michigan \" .", "output": "select t1.keyword from organization as t6 join author as t2 on t6.oid = t2.oid join writes as t4 on t4.aid = t2.aid join publication as t5 on t4.pid = t5.pid join publication_keyword as t3 on t5.pid = t3.pid join keyword as t1 on t3.kid = t1.kid where t6.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers of \" H. V. Jagadish \" containing keyword \" User Study \" .", "output": "select t5.title from publication_keyword as t3 join keyword as t1 on t3.kid = t1.kid join publication as t5 on t5.pid = t3.pid join writes as t4 on t4.pid = t5.pid join author as t2 on t4.aid = t2.aid where t2.name = \"H. v. Jagadish\" and t1.keyword = \"User Study\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers in PVLDB containing keyword \" Keyword search \" .", "output": "select t4.title from publication_keyword as t2 join keyword as t1 on t2.kid = t1.kid join publication as t4 on t4.pid = t2.pid join journal as t3 on t4.jid = t3.jid where t3.name = \"PVLDB\" and t1.keyword = \"Keyword search\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers in VLDB conference containing keyword \" Information Retrieval \" .", "output": "select t4.title from publication_keyword as t3 join keyword as t1 on t3.kid = t1.kid join publication as t4 on t4.pid = t3.pid join conference as t2 on t4.cid = t2.cid where t2.name = \"VLDB\" and t1.keyword = \"Information Retrieval\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have papers containing keyword \" Relational Database \" .", "output": "select t2.name from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t1.keyword = \"Relational Database\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the organizations in Databases area .", "output": "select t2.name from domain_author as t4 join author as t1 on t4.aid = t1.aid join domain as t3 on t3.did = t4.did join organization as t2 on t2.oid = t1.oid where t3.name = \"Databases\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the organizations in Databases area located in \" North America \" .", "output": "select t2.name from domain_author as t4 join author as t1 on t4.aid = t1.aid join domain as t3 on t3.did = t4.did join organization as t2 on t2.oid = t1.oid where t3.name = \"Databases\" and t2.continent = \"North America\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the researchers in \" University of Michigan \" .", "output": "select t1.name from organization as t2 join author as t1 on t2.oid = t1.oid where t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the researchers in Databases area in \" University of Michigan \" .", "output": "select t1.name from domain_author as t4 join author as t1 on t4.aid = t1.aid join domain as t3 on t3.did = t4.did join organization as t2 on t2.oid = t1.oid where t3.name = \"Databases\" and t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the papers in \" University of Michigan \" .", "output": "select t4.title from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t3 on t3.aid = t1.aid join publication as t4 on t3.pid = t4.pid where t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the papers after 2000 in \" University of Michigan \" .", "output": "select t4.title from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t3 on t3.aid = t1.aid join publication as t4 on t3.pid = t4.pid where t2.name = \"University of Michigan\" and t4.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the papers in VLDB conference in \" University of Michigan \" .", "output": "select t5.title from organization as t3 join author as t1 on t3.oid = t1.oid join writes as t4 on t4.aid = t1.aid join publication as t5 on t4.pid = t5.pid join conference as t2 on t5.cid = t2.cid where t2.name = \"VLDB\" and t3.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the papers in PVLDB in \" University of Michigan \" .", "output": "select t5.title from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t4 on t4.aid = t1.aid join publication as t5 on t4.pid = t5.pid join journal as t3 on t5.jid = t3.jid where t3.name = \"PVLDB\" and t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me all the papers in PVLDB after 2000 in \" University of Michigan \" .", "output": "select t5.title from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t4 on t4.aid = t1.aid join publication as t5 on t4.pid = t5.pid join journal as t3 on t5.jid = t3.jid where t3.name = \"PVLDB\" and t2.name = \"University of Michigan\" and t5.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper in Databases area with more than 200 citations .", "output": "select t3.title from domain as t2 join domain_publication as t1 on t2.did = t1.did join publication as t3 on t3.pid = t1.pid where t2.name = \"Databases\" and t3.citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper in PVLDB with more than 200 citations .", "output": "select t2.title from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper in VLDB conference with more than 200 citations .", "output": "select t2.title from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper by \" H. V. Jagadish \" with more than 200 citations .", "output": "select t3.title from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t1.name = \"H. v. Jagadish\" and t3.citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" on PVLDB with more than 200 citations .", "output": "select t4.title from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"PVLDB\" and t4.citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers by \" H. V. Jagadish \" on VLDB conference with more than 200 citations .", "output": "select t4.title from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"VLDB\" and t4.citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 with more than 200 citations .", "output": "select title from publication where citation_num > 200 and year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 in Databases area with more than 200 citations .", "output": "select t3.title from domain as t2 join domain_publication as t1 on t2.did = t1.did join publication as t3 on t3.pid = t1.pid where t2.name = \"Databases\" and t3.citation_num > 200 and t3.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 in PVLDB with more than 200 citations .", "output": "select t2.title from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.citation_num > 200 and t2.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 in VLDB conference with more than 200 citations .", "output": "select t2.title from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.citation_num > 200 and t2.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of conferences which have papers by \" H. V. Jagadish \" .", "output": "select count ( distinct t2.name ) from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of journals which have papers by \" H. V. Jagadish \" .", "output": "select count ( distinct t2.name ) from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers written by \" H. V. Jagadish \" in each year .", "output": "select count ( distinct t3.title ), t3.year from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t1.name = \"H. v. Jagadish\" group by t3.year;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of authors of \" Making database systems usable \" .", "output": "select count ( distinct t1.name ) from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t3.title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of citations of \" Making database systems usable \" in each year .", "output": "select year, sum ( citation_num ) from publication where title = \"Making database systems usable\" group by year;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of citations of \" Making database systems usable \" before 2010 .", "output": "select count ( distinct t2.title ) from publication as t3 join cite as t1 on t3.pid = t1.cited join publication as t2 on t2.pid = t1.citing where t3.title = \"Making database systems usable\" and t2.year < 2010;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers by \" H. V. Jagadish \" .", "output": "select count ( distinct t3.title ) from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers on VLDB conference .", "output": "select count ( distinct t2.title ) from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers on PVLDB .", "output": "select count ( distinct t2.title ) from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers after 2000 .", "output": "select count ( distinct title ) from publication where year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers on PVLDB after 2000 .", "output": "select count ( distinct t2.title ) from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers on VLDB conference after 2000 .", "output": "select count ( distinct t2.title ) from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers by \" H. V. Jagadish \" on PVLDB .", "output": "select count ( distinct t4.title ) from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers by \" H. V. Jagadish \" on VLDB conference .", "output": "select count ( distinct t4.title ) from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers by \" H. V. Jagadish \" after 2000 .", "output": "select count ( distinct t3.title ) from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t1.name = \"H. v. Jagadish\" and t3.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers by \" H. V. Jagadish \" on PVLDB after 2000 .", "output": "select count ( distinct t4.title ) from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"PVLDB\" and t4.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers by \" H. V. Jagadish \" on VLDB conference after 2000 .", "output": "select count ( distinct t4.title ) from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t2.name = \"VLDB\" and t4.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of keywords .", "output": "select count ( distinct keyword ) from keyword;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of keywords in Databases area .", "output": "select count ( distinct t1.keyword ) from domain as t3 join domain_keyword as t2 on t3.did = t2.did join keyword as t1 on t1.kid = t2.kid where t3.name = \"Databases\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers which contain the keyword \" Natural Language \" .", "output": "select count ( distinct t3.title ) from publication_keyword as t2 join keyword as t1 on t2.kid = t1.kid join publication as t3 on t3.pid = t2.pid where t1.keyword = \"Natural Language\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of the keywords of \" Making database systems usable \" .", "output": "select count ( distinct t1.keyword ) from publication_keyword as t3 join keyword as t1 on t3.kid = t1.kid join publication as t2 on t2.pid = t3.pid where t2.title = \"Making database systems usable\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of the keywords related to \" H. V. Jagadish \" .", "output": "select count ( distinct t1.keyword ) from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t2.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of keywords in VLDB conference .", "output": "select count ( distinct t1.keyword ) from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t3 on t3.pid = t4.pid join conference as t2 on t3.cid = t2.cid where t2.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of keywords in PVLDB .", "output": "select count ( distinct t1.keyword ) from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t2 on t2.pid = t4.pid join journal as t3 on t2.jid = t3.jid where t3.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of keywords in the papers of \" University of Michigan \" .", "output": "select count ( distinct t1.keyword ) from organization as t6 join author as t2 on t6.oid = t2.oid join writes as t4 on t4.aid = t2.aid join publication as t5 on t4.pid = t5.pid join publication_keyword as t3 on t5.pid = t3.pid join keyword as t1 on t3.kid = t1.kid where t6.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of the papers of \" H. V. Jagadish \" containing keyword \" User Study \" .", "output": "select count ( distinct t5.title ) from publication_keyword as t3 join keyword as t1 on t3.kid = t1.kid join publication as t5 on t5.pid = t3.pid join writes as t4 on t4.pid = t5.pid join author as t2 on t4.aid = t2.aid where t2.name = \"H. v. Jagadish\" and t1.keyword = \"User Study\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers in PVLDB containing keyword \" Keyword search \" .", "output": "select count ( distinct t4.title ) from publication_keyword as t2 join keyword as t1 on t2.kid = t1.kid join publication as t4 on t4.pid = t2.pid join journal as t3 on t4.jid = t3.jid where t3.name = \"PVLDB\" and t1.keyword = \"Keyword search\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers in VLDB conference containing keyword \" Information Retrieval \" .", "output": "select count ( distinct t4.title ) from publication_keyword as t3 join keyword as t1 on t3.kid = t1.kid join publication as t4 on t4.pid = t3.pid join conference as t2 on t4.cid = t2.cid where t2.name = \"VLDB\" and t1.keyword = \"Information Retrieval\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of authors who have papers containing keyword \" Relational Database \" .", "output": "select count ( distinct t2.name ) from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t1.keyword = \"Relational Database\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of the papers containing keyword \" Natural Language \"", "output": "select sum ( t3.citation_num ) from publication_keyword as t2 join keyword as t1 on t2.kid = t1.kid join publication as t3 on t3.pid = t2.pid where t1.keyword = \"Natural Language\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of the organizations .", "output": "select count ( distinct name ) from organization;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of the organizations in \" North America \" .", "output": "select count ( distinct name ) from organization where continent = \"North America\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of organizations in Databases area .", "output": "select count ( distinct t2.name ) from domain_author as t4 join author as t1 on t4.aid = t1.aid join domain as t3 on t3.did = t4.did join organization as t2 on t2.oid = t1.oid where t3.name = \"Databases\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of organizations in Databases area located in \" North America \" .", "output": "select count ( distinct t2.name ) from domain_author as t4 join author as t1 on t4.aid = t1.aid join domain as t3 on t3.did = t4.did join organization as t2 on t2.oid = t1.oid where t3.name = \"Databases\" and t2.continent = \"North America\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers in \" University of Michigan \" .", "output": "select count ( distinct t4.title ) from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t3 on t3.aid = t1.aid join publication as t4 on t3.pid = t4.pid where t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers in \" University of Michigan \" in Databases area .", "output": "select count ( distinct t4.title ) from domain_author as t6 join author as t1 on t6.aid = t1.aid join domain as t3 on t3.did = t6.did join domain_publication as t2 on t3.did = t2.did join organization as t5 on t5.oid = t1.oid join publication as t4 on t4.pid = t2.pid where t3.name = \"Databases\" and t5.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers after 2000 in \" University of Michigan \" .", "output": "select count ( distinct t4.title ) from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t3 on t3.aid = t1.aid join publication as t4 on t3.pid = t4.pid where t2.name = \"University of Michigan\" and t4.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers in VLDB conference in \" University of Michigan \" .", "output": "select count ( distinct t5.title ) from organization as t3 join author as t1 on t3.oid = t1.oid join writes as t4 on t4.aid = t1.aid join publication as t5 on t4.pid = t5.pid join conference as t2 on t5.cid = t2.cid where t2.name = \"VLDB\" and t3.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers in PVLDB in \" University of Michigan \" .", "output": "select count ( distinct t5.title ) from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t4 on t4.aid = t1.aid join publication as t5 on t4.pid = t5.pid join journal as t3 on t5.jid = t3.jid where t3.name = \"PVLDB\" and t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers in PVLDB after 2000 in \" University of Michigan \" .", "output": "select count ( distinct t5.title ) from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t4 on t4.aid = t1.aid join publication as t5 on t4.pid = t5.pid join journal as t3 on t5.jid = t3.jid where t3.name = \"PVLDB\" and t2.name = \"University of Michigan\" and t5.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of the papers in \" University of Michigan \" .", "output": "select sum ( t4.citation_num ) from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t3 on t3.aid = t1.aid join publication as t4 on t3.pid = t4.pid where t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of researchers in \" University of Michigan \" .", "output": "select count ( distinct t1.name ) from organization as t2 join author as t1 on t2.oid = t1.oid where t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of researchers in Databases area in \" University of Michigan \" .", "output": "select count ( distinct t1.name ) from domain_author as t4 join author as t1 on t4.aid = t1.aid join domain as t3 on t3.did = t4.did join organization as t2 on t2.oid = t1.oid where t3.name = \"Databases\" and t2.name = \"University of Michigan\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of authors who have papers in PVLDB .", "output": "select count ( distinct t1.name ) from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of authors who have papers in the VLDB conference .", "output": "select count ( distinct t1.name ) from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers published on PVLDB before 2000 .", "output": "select count ( distinct t2.title ) from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.year < 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers published in the VLDB conference before 2000 .", "output": "select count ( distinct t2.title ) from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.year < 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of all the papers in PVLDB .", "output": "select sum ( t2.citation_num ) from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the citations of each paper in PVLDB .", "output": "select t2.citation_num from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of papers in PVLDB in 2005 .", "output": "select sum ( t2.citation_num ) from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.year = 2005;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of papers in PVLDB before 2005 .", "output": "select sum ( t2.citation_num ) from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.year < 2005;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of papers in PVLDB in each year .", "output": "select t2.year, sum ( t2.citation_num ) from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" group by t2.year;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers published in PVLDB in each year .", "output": "select count ( distinct t2.title ), t2.year from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" group by t2.year;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of all the papers in the VLDB conference .", "output": "select sum ( t2.citation_num ) from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the citations of each paper in the VLDB conference .", "output": "select t2.citation_num from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of papers in the VLDB conference in 2005 .", "output": "select sum ( t2.citation_num ) from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.year = 2005;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of papers in the VLDB conference before 2005 .", "output": "select sum ( t2.citation_num ) from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.year < 2005;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the total citations of papers in the VLDB conference in each year .", "output": "select t2.year, sum ( t2.citation_num ) from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" group by t2.year;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers published in the VLDB conference in each year .", "output": "select count ( distinct t2.title ), t2.year from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" group by t2.year;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have cooperated both with \" H. V. Jagadish \" and \" Divesh Srivastava \" .", "output": "select t2.name from writes as t4 join author as t2 on t4.aid = t2.aid join publication as t7 on t4.pid = t7.pid join writes as t5 on t5.pid = t7.pid join writes as t6 on t6.pid = t7.pid join author as t1 on t5.aid = t1.aid join author as t3 on t6.aid = t3.aid where t1.name = \"H. v. Jagadish\" and t3.name = \"Divesh Srivastava\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have cooperated with \" H. V. Jagadish \" after 2000 .", "output": "select t2.name from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t1.name = \"H. v. Jagadish\" and t5.year > 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" .", "output": "select t5.title from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Divesh Srivastava\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers written by \" H. V. Jagadish \" and \" Yunyao Li \" after 2005 .", "output": "select t5.title from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Yunyao Li\" and t5.year > 2005;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers written by \" H. V. Jagadish \" and \" Yunyao Li \" on PVLDB .", "output": "select t6.title from publication as t6 join journal as t4 on t6.jid = t4.jid join writes as t3 on t3.pid = t6.pid join writes as t5 on t5.pid = t6.pid join author as t1 on t5.aid = t1.aid join author as t2 on t3.aid = t2.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Yunyao Li\" and t4.name = \"PVLDB\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers written by \" H. V. Jagadish \" and \" Yunyao Li \" on PVLDB after 2005 .", "output": "select t6.title from publication as t6 join journal as t4 on t6.jid = t4.jid join writes as t3 on t3.pid = t6.pid join writes as t5 on t5.pid = t6.pid join author as t1 on t5.aid = t1.aid join author as t2 on t3.aid = t2.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Yunyao Li\" and t4.name = \"PVLDB\" and t6.year > 2005;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have cooperated with \" H. V. Jagadish \" .", "output": "select t2.name from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" before 2000 .", "output": "select t5.title from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Divesh Srivastava\" and t5.year < 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have cited the papers by \" H. V. Jagadish \" .", "output": "select t2.name from publication as t7 join cite as t5 on t7.pid = t5.citing join publication as t6 on t6.pid = t5.cited join writes as t3 on t3.pid = t7.pid join writes as t4 on t4.pid = t6.pid join author as t2 on t3.aid = t2.aid join author as t1 on t4.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" .", "output": "select count ( distinct t5.title ) from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Divesh Srivastava\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" before 2000 .", "output": "select count ( distinct t5.title ) from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Divesh Srivastava\" and t5.year < 2000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of papers written by \" H. V. Jagadish \" , \" Yunyao Li \" , and \" Cong Yu \" .", "output": "select count ( distinct t7.title ) from writes as t4 join author as t2 on t4.aid = t2.aid join publication as t7 on t4.pid = t7.pid join writes as t5 on t5.pid = t7.pid join writes as t6 on t6.pid = t7.pid join author as t1 on t5.aid = t1.aid join author as t3 on t6.aid = t3.aid where t2.name = \"Cong Yu\" and t1.name = \"H. v. Jagadish\" and t3.name = \"Yunyao Li\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of authors who have cooperated with \" H. V. Jagadish \" .", "output": "select count ( distinct t2.name ) from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the number of authors who have cited the papers by \" H. V. Jagadish \" .", "output": "select count ( distinct t2.name ) from publication as t7 join cite as t5 on t7.pid = t5.citing join publication as t6 on t6.pid = t5.cited join writes as t3 on t3.pid = t7.pid join writes as t4 on t4.pid = t6.pid join author as t2 on t3.aid = t2.aid join author as t1 on t4.aid = t1.aid where t1.name = \"H. v. Jagadish\";"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" with more than 200 citations .", "output": "select t5.title from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t2.name = \"H. v. Jagadish\" and t1.name = \"Divesh Srivastava\" and t5.citation_num > 200;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the author who has the most number of papers containing keyword \" Relational Database \" .", "output": "select t2.name from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t1.keyword = \"Relational Database\" group by t2.name order by count ( distinct t3.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the conference that has the most number of papers containing keyword \" Relational Database \" .", "output": "select t2.name from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t3 on t3.pid = t4.pid join conference as t2 on t3.cid = t2.cid where t1.keyword = \"Relational Database\" group by t2.name order by count ( distinct t3.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the conference, which has the most number of papers containing keyword \" Relational Database \" .", "output": "select t2.name from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t3 on t3.pid = t4.pid join conference as t2 on t3.cid = t2.cid where t1.keyword = \"Relational Database\" group by t2.name order by count ( distinct t3.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the journal that has the most number of papers containing keyword \" Relational Database \" .", "output": "select t3.name from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t2 on t2.pid = t4.pid join journal as t3 on t2.jid = t3.jid where t1.keyword = \"Relational Database\" group by t3.name order by count ( distinct t2.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the journal, which has the most number of papers containing keyword \" Relational Database \" .", "output": "select t3.name from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t2 on t2.pid = t4.pid join journal as t3 on t2.jid = t3.jid where t1.keyword = \"Relational Database\" group by t3.name order by count ( distinct t2.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keyword, which have been contained by the most number of papers in VLDB conference .", "output": "select t1.keyword from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t3 on t3.pid = t4.pid join conference as t2 on t3.cid = t2.cid where t2.name = \"VLDB\" group by t1.keyword order by count ( distinct t3.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keyword, which have been contained by the most number of papers in PVLDB .", "output": "select t1.keyword from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t2 on t2.pid = t4.pid join journal as t3 on t2.jid = t3.jid where t3.name = \"PVLDB\" group by t1.keyword order by count ( distinct t2.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keyword, which have been contained by the most number of papers by \" H. V. Jagadish \" .", "output": "select t1.keyword from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t2.name = \"H. v. Jagadish\" group by t1.keyword order by count ( distinct t3.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the author in the \" University of Michigan \" whose papers have the most total citations .", "output": "select t1.name from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t3 on t3.aid = t1.aid join publication as t4 on t3.pid = t4.pid where t2.name = \"University of Michigan\" group by t1.name order by sum ( t4.citation_num ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the author in the \" University of Michigan \" whose papers in Databases area have the most total citations .", "output": "select t1.name from domain as t4 join domain_publication as t2 on t4.did = t2.did join publication as t5 on t5.pid = t2.pid join writes as t3 on t3.pid = t5.pid join author as t1 on t3.aid = t1.aid join organization as t6 on t6.oid = t1.oid where t4.name = \"Databases\" and t6.name = \"University of Michigan\" group by t1.name order by sum ( t5.citation_num ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the papers written by \" H. V. Jagadish \" and \" Divesh Srivastava \" with the most number of citations .", "output": "select t5.title from writes as t3 join author as t2 on t3.aid = t2.aid join publication as t5 on t3.pid = t5.pid join writes as t4 on t4.pid = t5.pid join author as t1 on t4.aid = t1.aid where t2.name = \"Divesh Srivastava\" and t1.name = \"H. v. Jagadish\" order by t5.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the conferences, which have more than 10 papers by \" H. V. Jagadish \" .", "output": "select t2.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" group by t2.name having count ( distinct t4.title ) > 10;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the conference, which have the most number of papers by \" H. V. Jagadish \" .", "output": "select t2.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" group by t2.name order by count ( distinct t4.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the journals, which have more than 10 papers by \" H. V. Jagadish \" .", "output": "select t2.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" group by t2.name having count ( distinct t4.title ) > 10;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the journal, which have the most number of papers by \" H. V. Jagadish \" .", "output": "select t2.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t1.name = \"H. v. Jagadish\" group by t2.name order by count ( distinct t4.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper with the most citations .", "output": "select title from publication order by citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper in Databases area with the most citations .", "output": "select t3.title from domain as t2 join domain_publication as t1 on t2.did = t1.did join publication as t3 on t3.pid = t1.pid where t2.name = \"Databases\" order by t3.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper in PVLDB with the most citations .", "output": "select t2.title from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" order by t2.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper in VLDB conference with the most citations .", "output": "select t2.title from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" order by t2.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper by \" H. V. Jagadish \" with the most citations .", "output": "select t3.title from writes as t2 join author as t1 on t2.aid = t1.aid join publication as t3 on t2.pid = t3.pid where t1.name = \"H. v. Jagadish\" order by t3.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 with the most citations .", "output": "select title from publication where year > 2000 order by citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 in Databases area with the most citations .", "output": "select t3.title from domain as t2 join domain_publication as t1 on t2.did = t1.did join publication as t3 on t3.pid = t1.pid where t2.name = \"Databases\" and t3.year > 2000 order by t3.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 in PVLDB with the most citations .", "output": "select t2.title from publication as t2 join journal as t1 on t2.jid = t1.jid where t1.name = \"PVLDB\" and t2.year > 2000 order by t2.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the paper after 2000 in VLDB conference with the most citations .", "output": "select t2.title from publication as t2 join conference as t1 on t2.cid = t1.cid where t1.name = \"VLDB\" and t2.year > 2000 order by t2.citation_num desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have more than 10 papers in PVLDB .", "output": "select t1.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"PVLDB\" group by t1.name having count ( distinct t4.title ) > 10;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have the most number of papers in PVLDB .", "output": "select t1.name from publication as t4 join journal as t2 on t4.jid = t2.jid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"PVLDB\" group by t1.name order by count ( distinct t4.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have more than 10 papers containing keyword \" Relational Database \" .", "output": "select t2.name from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t1.keyword = \"Relational Database\" group by t2.name having count ( distinct t3.title ) > 10;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the conferences, which have more than 60 papers containing keyword \" Relational Database \" .", "output": "select t2.name from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t3 on t3.pid = t4.pid join conference as t2 on t3.cid = t2.cid where t1.keyword = \"Relational Database\" group by t2.name having count ( distinct t3.title ) > 60;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the journals, which have more than 60 papers containing keyword \" Relational Database \" .", "output": "select t3.name from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t2 on t2.pid = t4.pid join journal as t3 on t2.jid = t3.jid where t1.keyword = \"Relational Database\" group by t3.name having count ( distinct t2.title ) > 60;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords, which have been contained by more than 100 papers in VLDB conference .", "output": "select t1.keyword from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t3 on t3.pid = t4.pid join conference as t2 on t3.cid = t2.cid where t2.name = \"VLDB\" group by t1.keyword having count ( distinct t3.title ) > 100;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords, which have been contained by more than 100 papers in PVLDB .", "output": "select t1.keyword from publication_keyword as t4 join keyword as t1 on t4.kid = t1.kid join publication as t2 on t2.pid = t4.pid join journal as t3 on t2.jid = t3.jid where t3.name = \"PVLDB\" group by t1.keyword having count ( distinct t2.title ) > 100;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the keywords, which have been contained by more than 10 papers of \" H. V. Jagadish \" .", "output": "select t1.keyword from publication_keyword as t5 join keyword as t1 on t5.kid = t1.kid join publication as t3 on t3.pid = t5.pid join writes as t4 on t4.pid = t3.pid join author as t2 on t4.aid = t2.aid where t2.name = \"H. v. Jagadish\" group by t1.keyword having count ( distinct t3.title ) > 10;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the authors who have more than 10 papers in the VLDB conference .", "output": "select t1.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"VLDB\" group by t1.name having count ( distinct t4.title ) > 10;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the author who has the most number of papers in the VLDB conference .", "output": "select t1.name from publication as t4 join conference as t2 on t4.cid = t2.cid join writes as t3 on t3.pid = t4.pid join author as t1 on t3.aid = t1.aid where t2.name = \"VLDB\" group by t1.name order by count ( distinct t4.title ) desc limit 1;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the author in the \" University of Michigan \" whose papers have more than 5000 total citations .", "output": "select t1.name from organization as t2 join author as t1 on t2.oid = t1.oid join writes as t3 on t3.aid = t1.aid join publication as t4 on t3.pid = t4.pid where t2.name = \"University of Michigan\" group by t1.name having sum ( t4.citation_num ) > 5000;"}, {"instruction": "academic contains tables such as author, conference, domain, domain_author, domain_conference, journal, domain_journal, keyword, domain_keyword, publication, domain_publication, organization, publication_keyword, writes, cite. Table author has columns such as aid, homepage, name, oid. aid is the primary key. Table conference has columns such as cid, homepage, name. cid is the primary key. Table domain has columns such as did, name. did is the primary key. Table domain_author has columns such as aid, did. did is the primary key. Table domain_conference has columns such as cid, did. did is the primary key. Table journal has columns such as homepage, jid, name. jid is the primary key. Table domain_journal has columns such as did, jid. did is the primary key. Table keyword has columns such as keyword, kid. kid is the primary key. Table domain_keyword has columns such as did, kid. did is the primary key. Table publication has columns such as abstract, cid, citation_num, jid, pid, reference_num, title, year. pid is the primary key. Table domain_publication has columns such as did, pid. did is the primary key. Table organization has columns such as continent, homepage, name, oid. oid is the primary key. Table publication_keyword has columns such as pid, kid. kid is the primary key. Table writes has columns such as aid, pid. aid is the primary key. Table cite has columns such as cited, citing. is the primary key. The did of domain_author is the foreign key of did of domain. The aid of domain_author is the foreign key of aid of author. The did of domain_conference is the foreign key of did of domain. The cid of domain_conference is the foreign key of cid of conference. The did of domain_journal is the foreign key of did of domain. The jid of domain_journal is the foreign key of jid of journal. The did of domain_keyword is the foreign key of did of domain. The kid of domain_keyword is the foreign key of kid of keyword. The cid of publication is the foreign key of cid of conference. The jid of publication is the foreign key of jid of journal. The did of domain_publication is the foreign key of did of domain. The pid of domain_publication is the foreign key of pid of publication. The kid of publication_keyword is the foreign key of kid of keyword. The pid of publication_keyword is the foreign key of pid of publication. The aid of writes is the foreign key of aid of author. The pid of writes is the foreign key of pid of publication. The citing of cite is the foreign key of pid of publication. The cited of cite is the foreign key of pid of publication.", "input": "return me the author in the \" University of Michigan \" in Databases area whose papers have more than 5000 total citations .", "output": "select t1.name from domain_author as t6 join author as t1 on t6.aid = t1.aid join domain as t3 on t3.did = t6.did join organization as t5 on t5.oid = t1.oid join writes as t2 on t2.aid = t1.aid join publication as t4 on t2.pid = t4.pid where t3.name = \"Databases\" and t5.name = \"University of Michigan\" group by t1.name having sum ( t4.citation_num ) > 5000;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What year is the movie \" The Imitation Game \" from ?", "output": "select release_year from movie where title = \"The imitation Game\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What year was the movie \" The Imitation Game \" produced", "output": "select release_year from movie where title = \"The imitation Game\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What year was \" Benedict Cumberbatch \" born ?", "output": "select birth_year from actor where name = \"Benedict Cumberbatch\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "In what year was \" Benedict Cumberbatch \" born", "output": "select birth_year from actor where name = \"Benedict Cumberbatch\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the nationality of the actress \" Christoph Waltz \" ?", "output": "select nationality from actor where name = \"Christoph Waltz\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the nationality of the actor \" Christoph Waltz \" ?", "output": "select nationality from actor where name = \"Christoph Waltz\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies produced in 2015", "output": "select title from movie where release_year = 2015;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors born in \" Tehran \"", "output": "select name from actor where birth_city = \"Tehran\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors born in Tehran", "output": "select name from actor where birth_city = \"Tehran\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Which actors were born in Tehran", "output": "select name from actor where birth_city = \"Tehran\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors who are from Afghanistan", "output": "select name from actor where nationality = \"Afghanistan\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors from Afghanistan", "output": "select name from actor where nationality = \"Afghanistan\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Give me the name of all the actors from Afghanistan", "output": "select name from actor where nationality = \"Afghanistan\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors who were born in 1984", "output": "select name from actor where birth_year = 1984;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "When was \" Kevin Spacey \" born ?", "output": "select birth_year from actor where name = \"actor_name0\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "In what year was \" Kevin Spacey \" born ?", "output": "select birth_year from actor where name = \"actor_name0\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Where is the birth place of \" Kevin Spacey \"", "output": "select birth_city from director where name = \"director_name0\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "In what city was \" Kevin Spacey \" born ?", "output": "select birth_city from director where name = \"director_name0\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the nationality of \" Kevin Spacey \" ?", "output": "select nationality from director where name = \"director_name0\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How much was the budget of \" Finding Nemo \"", "output": "select budget from movie where title = \"Finding Nemo\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies directed by \" Steven Spielberg \" after 2006", "output": "select t3.title from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Steven Spielberg\" and t3.release_year > 2006;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who is the director of the movie \" James Bond \" ?", "output": "select t2.name from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t3.title = \"James Bond\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who directed the movie \" James Bond \" ?", "output": "select t2.name from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t3.title = \"James Bond\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "List \" James Bond \" directors", "output": "select t2.name from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t3.title = \"James Bond\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the actor who played \" Alan Turing \" in the movie \" The Imitation Game \"", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t2.role = \"Alan Turing\" and t3.title = \"The imitation Game\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who acted \" Alan Turing \" in the movie \" The Imitation Game \" ?", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t2.role = \"Alan Turing\" and t3.title = \"The imitation Game\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who was the actor that played \" Alan Turing \" in the movie \" The Imitation Game \" ?", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t2.role = \"Alan Turing\" and t3.title = \"The imitation Game\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who acts as \" Alan Turing \" in the movie \" The Imitation Game \" ?", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t2.role = \"Alan Turing\" and t3.title = \"The imitation Game\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who is the actor playing \" Alan Turing \" in \" The Imitation Game \" ?", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t2.role = \"Alan Turing\" and t3.title = \"The imitation Game\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the genre of the movie \" Jurassic Park \" ?", "output": "select t2.genre from genre as t2 join classification as t1 on t2.gid = t1.gid join movie as t3 on t3.mid = t1.msid where t3.title = \"Jurassic Park\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who was the director of the movie Joy from 2015 ?", "output": "select t2.name from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t3.release_year = 2015 and t3.title = \"Joy\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies written by \" Matt Damon \"", "output": "select t1.title from written_by as t3 join movie as t1 on t3.msid = t1.mid join writer as t2 on t3.wid = t2.wid where t2.name = \"Matt Damon\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies written and produced by \" Woody Allen \"", "output": "select t2.title from movie as t2 join made_by as t3 on t2.mid = t3.msid join producer as t1 on t1.pid = t3.pid join written_by as t5 on t5.msid = t2.mid join writer as t4 on t5.wid = t4.wid where t1.name = \"Woody Allen\" and t4.name = \"Woody Allen\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies featuring \" Robin Wright \"", "output": "select t2.title from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Robin Wright\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What are all the movies featuring \" Robin Wright \" ?", "output": "select t2.title from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Robin Wright\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies in which \" Robin Wright \" appears", "output": "select t2.title from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Robin Wright\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What was the budget of the movie Juno from 2007 ?", "output": "select budget from movie where release_year = 2007 and title = \"Juno\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all Sci-Fi produced in year 2010", "output": "select t3.title from genre as t2 join classification as t1 on t2.gid = t1.gid join movie as t3 on t3.mid = t1.msid where t2.genre = \"Sci-Fi\" and t3.release_year = 2010;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "List all the Sci-Fi movies which released in 2010", "output": "select t3.title from genre as t2 join classification as t1 on t2.gid = t1.gid join movie as t3 on t3.mid = t1.msid where t2.genre = \"Sci-Fi\" and t3.release_year = 2010;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors born in \" Austin \" after 1980", "output": "select name from actor where birth_city = \"Austin\" and birth_year > 1980;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who are the actors born in \" Austin \" after 1980 ?", "output": "select name from actor where birth_city = \"Austin\" and birth_year > 1980;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors from Austin born after 1980", "output": "select name from actor where birth_city = \"Austin\" and birth_year > 1980;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies by directors born in \" Los Angeles \"", "output": "select t3.title from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.birth_city = \"Los Angeles\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors who were born in \" New York City \" in 1984", "output": "select name from actor where birth_city = \"New york City\" and birth_year = 1984;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies about nuclear weapons", "output": "select t3.title from tags as t2 join keyword as t1 on t2.kid = t1.id join movie as t3 on t2.msid = t3.mid where t1.keyword = \"nuclear weapons\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What are the movies related to nuclear weapons", "output": "select t3.title from tags as t2 join keyword as t1 on t2.kid = t1.id join movie as t3 on t2.msid = t3.mid where t1.keyword = \"nuclear weapons\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Which movies did \" Alfred Hitchcock \" direct ?", "output": "select t3.title from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Alfred Hitchcock\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies directed by \" Asghar Farhadi \" and featuring \" Taraneh Alidoosti \"", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join directed_by as t2 on t4.mid = t2.msid join director as t3 on t3.did = t2.did where t1.name = \"Taraneh Alidoosti\" and t3.name = \"Asghar Farhadi\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What are all the movies directed by \" Asghar Farhadi \" featuring \" Taraneh Alidoosti \" ?", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join directed_by as t2 on t4.mid = t2.msid join director as t3 on t3.did = t2.did where t1.name = \"Taraneh Alidoosti\" and t3.name = \"Asghar Farhadi\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies are there that are directed by \" Asghar Farhadi \" and featuring \" Taraneh Alidoosti \" ?", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join directed_by as t2 on t4.mid = t2.msid join director as t3 on t3.did = t2.did where t1.name = \"Taraneh Alidoosti\" and t3.name = \"Asghar Farhadi\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "List all the movies directed by \" Asghar Farhadi \" in which \" Taraneh Alidoosti \" played", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join directed_by as t2 on t4.mid = t2.msid join director as t3 on t3.did = t2.did where t1.name = \"Taraneh Alidoosti\" and t3.name = \"Asghar Farhadi\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What are all the tv series created by \" Shonda Rhimes \" ?", "output": "select t2.title from producer as t1 join made_by as t3 on t1.pid = t3.pid join tv_series as t2 on t2.sid = t3.msid where t1.name = \"Shonda Rhimes\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who acts \" Olivia Pope \" in the series Scandal ?", "output": "select t1.name from cast as t3 join actor as t1 on t3.aid = t1.aid join tv_series as t2 on t2.sid = t3.msid where t3.role = \"Olivia Pope\" and t2.title = \"Scandal\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who is the writer of the movie \" The Truman Show \"", "output": "select t2.name from written_by as t3 join movie as t1 on t3.msid = t1.mid join writer as t2 on t3.wid = t2.wid where t1.title = \"The truman Show\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who is the writer of \" The Truman Show \"", "output": "select t2.name from written_by as t3 join movie as t1 on t3.msid = t1.mid join writer as t2 on t3.wid = t2.wid where t1.title = \"The truman Show\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What are the series featuring \" Scott Foley \" ?", "output": "select t2.title from cast as t3 join actor as t1 on t3.aid = t1.aid join tv_series as t2 on t2.sid = t3.msid where t1.name = \"Scott Foley\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What are the series in which \" Scott Foley \" is an actor ?", "output": "select t2.title from cast as t3 join actor as t1 on t3.aid = t1.aid join tv_series as t2 on t2.sid = t3.msid where t1.name = \"Scott Foley\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the directors of all movies featuring \" Kate Winslet \"", "output": "select t3.name from cast as t4 join actor as t1 on t4.aid = t1.aid join movie as t5 on t5.mid = t4.msid join directed_by as t2 on t5.mid = t2.msid join director as t3 on t3.did = t2.did where t1.name = \"Kate Winslet\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the producers of all movies in which \" Kate Winslet \" is an actor", "output": "select t1.name from cast as t3 join actor as t2 on t3.aid = t2.aid join movie as t5 on t5.mid = t3.msid join made_by as t4 on t5.mid = t4.msid join producer as t1 on t1.pid = t4.pid where t2.name = \"Kate Winslet\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Who is the director of the tv series \" House of Cards \" from 2013 ?", "output": "select t2.name from director as t2 join directed_by as t1 on t2.did = t1.did join tv_series as t3 on t3.sid = t1.msid where t3.release_year = 2013 and t3.title = \"House of Cards\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all the female actors from Austin", "output": "select name from actor where birth_city = \"Austin\" and gender = \"female\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors from Italy born after 1980", "output": "select name from actor where birth_year > 1980 and nationality = \"Italy\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all the female actors born in \" New York City \" after 1980", "output": "select name from actor where birth_city = \"New york City\" and birth_year > 1980 and gender = \"female\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all the female actors in the movie \" Saving Private Ryan \"", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t1.gender = \"female\" and t3.title = \"Saving private Ryan\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all the directors who are from Afghanistan", "output": "select name from director where nationality = \"Afghanistan\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the actors who played in the movie \" Camp X-Ray \"", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t3.title = \"Camp x-Ray\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors from Canada who acted in \" James Bond \" movies", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t1.nationality = \"Canada\" and t3.title = \"James Bond\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "find all films in which \" Rowan Atkinson \" acted as \" Mr. Bean \"", "output": "select t2.title from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Rowan Atkinson\" and t3.role = \"Mr. Bean\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "where is the director of \" The Past \" from", "output": "select t2.birth_city from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t3.title = \"The Past\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "who acted the role of \" Mr. Bean \"", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid where t2.role = \"Mr. Bean\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "what are the genres of movies directed by \" Asghar Farhadi \"", "output": "select t3.genre from director as t5 join directed_by as t2 on t5.did = t2.did join movie as t4 on t4.mid = t2.msid join classification as t1 on t4.mid = t1.msid join genre as t3 on t3.gid = t1.gid where t5.name = \"Asghar Farhadi\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Which movie had the character \" Daffy Duck \"", "output": "select t1.title from movie as t1 join cast as t2 on t1.mid = t2.msid where t2.role = \"Daffy Duck\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What are the major roles in the movie \" Daddy Long Legs \"", "output": "select t2.role from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t3.title = \"Daddy long Legs\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "List all the directors of movies about nuclear weapons", "output": "select t3.name from director as t3 join directed_by as t2 on t3.did = t2.did join movie as t4 on t4.mid = t2.msid join tags as t5 on t5.msid = t4.mid join keyword as t1 on t5.kid = t1.id where t1.keyword = \"nuclear weapons\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the number of movies in which \" Jennifer Aniston \" acted after 2010 ?", "output": "select count ( distinct t2.title ) from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Jennifer Aniston\" and t2.release_year > 2010;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the number of actors in the movie \" Saving Private Ryan \" ?", "output": "select count ( distinct t1.name ) from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t3.title = \"Saving private Ryan\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many actors are in the movie \" Saving Private Ryan \" ?", "output": "select count ( distinct t1.name ) from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t3.title = \"Saving private Ryan\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies did \" Steven Spielberg \" direct ?", "output": "select count ( distinct t3.title ) from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Steven Spielberg\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies were produced in the year 2013 ?", "output": "select count ( distinct title ) from movie where release_year = 2013;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the number of movies produced in 2013 ?", "output": "select count ( distinct title ) from movie where release_year = 2013;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the number of movies directed by \" Woody Allen \" per year ?", "output": "select count ( distinct t3.title ), t3.release_year from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Woody Allen\" group by t3.release_year;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies did \" Shahab Hosseini \" act in ?", "output": "select count ( distinct t2.title ) from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Shahab Hosseini\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the number of movies in which \" Shahab Hosseini \" acted ?", "output": "select count ( distinct t2.title ) from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Shahab Hosseini\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the number of movies featuring \" Shahab Hosseini \" ?", "output": "select count ( distinct t2.title ) from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Shahab Hosseini\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies did \" Shahab Hosseini \" act in", "output": "select count ( distinct t2.title ) from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Shahab Hosseini\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many actors were born in \" Los Angeles \" after 2000 ?", "output": "select count ( distinct name ) from actor where birth_city = \"Los Angeles\" and birth_year > 2000;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies did \" Humphrey Bogart \" act in before 1942 ?", "output": "select count ( distinct t2.title ) from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Humphrey Bogart\" and t2.release_year < 1942;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the number of movies that \" Brad Pitt \" acts in per year ?", "output": "select count ( distinct t2.title ), t2.release_year from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.name = \"Brad Pitt\" group by t2.release_year;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies about Iraq war were produced in 2015 ?", "output": "select count ( distinct t3.title ) from tags as t2 join keyword as t1 on t2.kid = t1.id join movie as t3 on t2.msid = t3.mid where t1.keyword = \"Iraq war\" and t3.release_year = 2015;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies about Persians were released after 1990 ?", "output": "select count ( distinct t3.title ) from tags as t2 join keyword as t1 on t2.kid = t1.id join movie as t3 on t2.msid = t3.mid where t1.keyword = \"Persians\" and t3.release_year > 1990;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies did \" Quentin Tarantino \" direct after 2010 ?", "output": "select count ( distinct t3.title ) from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Quentin Tarantino\" and t3.release_year > 2010;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies did \" Quentin Tarantino \" direct before 2010 ?", "output": "select count ( distinct t3.title ) from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Quentin Tarantino\" and t3.release_year < 2010;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many movies did \" Quentin Tarantino \" direct before 2002 and after 2010 ?", "output": "select count ( distinct t4.title ) from director as t3 join directed_by as t2 on t3.did = t2.did join movie as t4 on t4.mid = t2.msid join made_by as t5 on t4.mid = t5.msid join producer as t1 on t1.pid = t5.pid where t3.name = \"Quentin Tarantino\" and t4.release_year < 2010 and t4.release_year > 2002;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many female actors were born in \" New York City \" after 1980 ?", "output": "select count ( distinct name ) from actor where birth_city = \"New york City\" and birth_year > 1980 and gender = \"female\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "find the number of actors from Iran who played in \" Jim Jarmusch \" movies", "output": "select count ( distinct t1.name ) from cast as t4 join actor as t1 on t4.aid = t1.aid join movie as t5 on t5.mid = t4.msid join directed_by as t2 on t5.mid = t2.msid join director as t3 on t3.did = t2.did where t1.nationality = \"Iran\" and t3.name = \"Jim Jarmusch\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "How many actors from China have acted in \" Rush Hour 3 \"", "output": "select count ( distinct t1.name ) from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t1.nationality = \"China\" and t3.title = \"Rush hour 3\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies that star both \" Woody Strode \" and \" Jason Robards \"", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join cast as t3 on t4.mid = t3.msid join actor as t2 on t3.aid = t2.aid where t1.name = \"Woody Strode\" and t2.name = \"Jason Robards\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies featuring \" Woody Strode \" and \" Jason Robards \"", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join cast as t3 on t4.mid = t3.msid join actor as t2 on t3.aid = t2.aid where t1.name = \"Woody Strode\" and t2.name = \"Jason Robards\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies featuring both \" Woody Strode \" and \" Jason Robards \"", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join cast as t3 on t4.mid = t3.msid join actor as t2 on t3.aid = t2.aid where t1.name = \"Woody Strode\" and t2.name = \"Jason Robards\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all movies featuring \" Jason Robards \" and \" Woody Strode \"", "output": "select t4.title from cast as t5 join actor as t1 on t5.aid = t1.aid join movie as t4 on t4.mid = t5.msid join cast as t3 on t4.mid = t3.msid join actor as t2 on t3.aid = t2.aid where t1.name = \"Woody Strode\" and t2.name = \"Jason Robards\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find all actors who acted in the same movie as \" Tom Hanks \"", "output": "select t1.name from cast as t4 join actor as t1 on t4.aid = t1.aid join movie as t5 on t5.mid = t4.msid join cast as t3 on t5.mid = t3.msid join actor as t2 on t3.aid = t2.aid where t2.name = \"Tom Hanks\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What movies have the same director as the movie \" Revolutionary Road \" ?", "output": "select t3.title from director as t5 join directed_by as t2 on t5.did = t2.did join directed_by as t1 on t5.did = t1.did join movie as t4 on t4.mid = t2.msid join movie as t3 on t3.mid = t1.msid where t4.title = \"Revolutionary Road\";"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the movie which is classified in the most number of genres", "output": "select t3.title from genre as t2 join classification as t1 on t2.gid = t1.gid join movie as t3 on t3.mid = t1.msid group by t3.title order by count ( distinct t2.genre ) desc limit 1;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "which movie has the most number of actors from China ?", "output": "select t2.title from cast as t3 join actor as t1 on t3.aid = t1.aid join movie as t2 on t2.mid = t3.msid where t1.nationality = \"China\" group by t2.title order by count ( distinct t1.name ) desc limit 1;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the actors who played in the latest movie by \" Quentin Tarantino \"", "output": "select t1.name from cast as t4 join actor as t1 on t4.aid = t1.aid join movie as t5 on t5.mid = t4.msid join directed_by as t2 on t5.mid = t2.msid join director as t3 on t3.did = t2.did where t3.name = \"Quentin Tarantino\" order by t5.release_year desc limit 1;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the name and budget of the latest movie by \" Quentin Tarantino \"", "output": "select t3.budget, t3.title from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Quentin Tarantino\" order by t3.release_year desc limit 1;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "What is the latest movie by \" Jim Jarmusch \"", "output": "select t3.title from director as t2 join directed_by as t1 on t2.did = t1.did join movie as t3 on t3.mid = t1.msid where t2.name = \"Jim Jarmusch\" order by t3.release_year desc limit 1;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Which producer has worked with the most number of directors ?", "output": "select t1.name from director as t3 join directed_by as t2 on t3.did = t2.did join movie as t4 on t4.mid = t2.msid join made_by as t5 on t4.mid = t5.msid join producer as t1 on t1.pid = t5.pid group by t1.name order by count ( distinct t3.name ) desc limit 1;"}, {"instruction": "imdb contains tables such as actor, copyright, cast, genre, classification, company, director, producer, directed_by, keyword, made_by, movie, tags, tv_series, writer, written_by. Table actor has columns such as aid, gender, name, nationality, birth_city, birth_year. aid is the primary key. Table copyright has columns such as id, msid, cid. id is the primary key. Table cast has columns such as id, msid, aid, role. id is the primary key. Table genre has columns such as gid, genre. gid is the primary key. Table classification has columns such as id, msid, gid. id is the primary key. Table company has columns such as id, name, country_code. id is the primary key. Table director has columns such as did, gender, name, nationality, birth_city, birth_year. did is the primary key. Table producer has columns such as pid, gender, name, nationality, birth_city, birth_year. pid is the primary key. Table directed_by has columns such as id, msid, did. id is the primary key. Table keyword has columns such as id, keyword. id is the primary key. Table made_by has columns such as id, msid, pid. id is the primary key. Table movie has columns such as mid, title, release_year, title_aka, budget. mid is the primary key. Table tags has columns such as id, msid, kid. id is the primary key. Table tv_series has columns such as sid, title, release_year, num_of_seasons, num_of_episodes, title_aka, budget. sid is the primary key. Table writer has columns such as wid, gender, name, nationality, num_of_episodes, birth_city, birth_year. wid is the primary key. Table written_by has columns such as id, msid, wid. is the primary key. The msid of cast is the foreign key of msid of copyright. The aid of cast is the foreign key of aid of actor. The msid of classification is the foreign key of msid of copyright. The gid of classification is the foreign key of gid of genre. The did of directed_by is the foreign key of did of director. The msid of directed_by is the foreign key of msid of copyright. The pid of made_by is the foreign key of pid of producer. The msid of made_by is the foreign key of msid of copyright. The msid of tags is the foreign key of msid of copyright. The wid of written_by is the foreign key of wid of writer. The msid of written_by is the foreign key of msid of copyright.", "input": "Find the latest movie which \" Gabriele Ferzetti \" acted in", "output": "select t1.name from cast as t2 join actor as t1 on t2.aid = t1.aid join movie as t3 on t3.mid = t2.msid where t1.name = \"Gabriele Ferzetti\" order by t3.release_year desc limit 1;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many buttercup kitchen are there in san francisco ?", "output": "select count ( * ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.name = \"buttercup kitchen\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many chinese restaurants are there in the bay area ?", "output": "select count ( * ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"chinese\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many places for chinese food are there in the bay area ?", "output": "select count ( * ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"chinese\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many chinese places are there in the bay area ?", "output": "select count ( * ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"chinese\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many places for chinese are there in the bay area ?", "output": "select count ( * ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"chinese\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many jamerican cuisine are there in santa cruz county ?", "output": "select count ( * ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.county = \"santa cruz county\" and t1.name = \"jamerican cuisine\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is jamerican cuisine ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t1.name = \"jamerican cuisine\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is the best french restaurant in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "What is the best french in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "What is the best place in san francisco for french food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "Give me the best place in san francisco for french food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "Where is the best french in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "Give me the best french in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "Where is the best french restaurant in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "Give me the best restaurant in san francisco for french food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "Give me the best french restaurant in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "What is the best restaurant in san francisco for french food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "Where is the best restaurant in san francisco for french food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.food_type = \"french\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is denny in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.name = \"denny\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good restaurants on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good restaurants on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good restaurant on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is a good restaurant on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can we find a restaurant in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a restaurant in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can we find some restaurants in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a restaurant in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some restaurants in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some restaurants good for french food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some restaurants good for french food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many places for french food are there in palo alto ?", "output": "select count ( * ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"palo alto\" and t1.food_type = \"french\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many french restaurants are there in palo alto ?", "output": "select count ( * ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"palo alto\" and t1.food_type = \"french\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many french restaurant are there in palo alto ?", "output": "select count ( * ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"palo alto\" and t1.food_type = \"french\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many places for french are there in palo alto ?", "output": "select count ( * ) from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"palo alto\" and t1.food_type = \"french\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many italian restaurants are in the yolo county ?", "output": "select count ( * ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.county = \"yolo county\" and t1.food_type = \"italian\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i eat french food in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"french\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "how many denny are there in the bay area ?", "output": "select count ( * ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.name = \"denny\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good restaurant in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good restaurants in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is a good restaurant in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good restaurants in alameda ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"alameda\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good restaurant on buchanan in san francisco for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some good arabics on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good arabic restaurant on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good places for arabic on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good arabic on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some restaurants good for arabic food on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good place on buchanan in san francisco for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good place on buchanan in san francisco for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i eat arabic food on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good places on buchanan in san francisco for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a arabic restaurant on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a restaurant on buchanan in san francisco that serves good arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good restaurant on buchanan in san francisco for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a restaurant on buchanan in san francisco that serves good arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good restaurants on buchanan in san francisco for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good places for arabic on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i eat some good arabic food on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good arabic on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some restaurants good for arabic food on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some good places for arabic on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good arabic restaurant on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good arabics on buchanan in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t2.street_name = \"buchanan\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i eat french food in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"french\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some restaurants on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a restaurant on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can we find a restaurant on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can we find some restaurants on bethel island rd in bethel island ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"bethel island\" and t2.street_name = \"bethel island rd\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is the best restaurant in the bay area for american food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is the best restaurant in bay area for american food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is the best restaurant in bay area for american food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is the best american restaurant in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is the best american restaurant in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is the best american in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me the best restaurant in the bay area for american food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me the best restaurant in bay area for american food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is the best restaurant in the bay area for american food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is the best american in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me the best american in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me the best american restaurant in the bay area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"bay area\" and t1.food_type = \"american\" and t1.rating = ( select max ( t1.rating ) from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name where t2.region = \"bay area\" and t1.food_type = \"american\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some restaurants good for french food in the yosemite and mono lake area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good places in the yosemite and mono lake area for french food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good restaurant in the yosemite and mono lake area for french food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good french restaurant in the yosemite and mono lake area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good place in the yosemite and mono lake area for french food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some restaurants good for french food in the yosemite and mono lake area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good place in the yosemite and mono lake area for french food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good restaurant in the yosemite and mono lake area for french food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good restaurants in the yosemite and mono lake area for french food ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good french restaurant in the yosemite and mono lake area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i eat some good french food in the yosemite and mono lake area ?", "output": "select t3.house_number, t1.name from restaurant as t1 join geographic as t2 on t1.city_name = t2.city_name join location as t3 on t1.id = t3.restaurant_id where t2.region = \"yosemite and mono lake area\" and t1.food_type = \"french\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some restaurants good for arabic food in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good places in mountain view for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some good arabic restaurants in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "show me a good arabic restaurant in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good arabic in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good arabic restaurant in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good place in mountain view for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some good arabics in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a restaurant in mountain view that serves good arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good restaurants in mountain view for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some restaurants good for arabic food in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i eat some good arabic food in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good places for arabic in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good arabic in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a restaurant in mountain view that serves good arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good arabic restaurants in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where are some good places for arabic in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good arabics in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good restaurant in mountain view for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good arabic restaurant in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good places for arabic in mountain view ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good restaurant in mountain view for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a good place in mountain view for arabic food ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"mountain view\" and t1.food_type = \"arabic\" and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i find a jamerican cuisine in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.name = \"jamerican cuisine\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is jamerican cuisine in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.name = \"jamerican cuisine\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where is a jamerican cuisine in san francisco ?", "output": "select t2.house_number, t1.name from restaurant as t1 join location as t2 on t1.id = t2.restaurant_id where t2.city_name = \"san francisco\" and t1.name = \"jamerican cuisine\";"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can we find some restaurants in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"bay area\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some restaurants in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"bay area\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a restaurant in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"bay area\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "where can i find a restaurant in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"bay area\" );"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me a good restaurant in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"region0\" ) and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what are some good restaurants in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"region0\" ) and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "give me some good restaurants in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"region0\" ) and t1.rating > 2.5;"}, {"instruction": "restaurants contains tables such as geographic, restaurant, location. Table geographic has columns such as city_name, county, region. city_name is the primary key. Table restaurant has columns such as id, name, food_type, city_name, rating. id is the primary key. Table location has columns such as restaurant_id, house_number, street_name, city_name. restaurant_id is the primary key. The city_name of restaurant is the foreign key of city_name of geographic. The city_name of location is the foreign key of city_name of geographic.", "input": "what is a good restaurant in the bay area ?", "output": "select t2.house_number, t1.name from location as t2 join restaurant as t1 on t1.id = t2.restaurant_id where t1.city_name in ( select city_name from geographic where region = \"region0\" ) and t1.rating > 2.5;"}] \ No newline at end of file